You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: opencode always opens ~ instead of requested directory (/api/location 500 with null-byte shell path) #49997
opencode v2.0.10 ignores the target directory and always opens ~ instead (e.g. opencode /home/marcos/Projetos/fingerprint-manager, cd ... && opencode, and session_move all stay/fall back to /home/marcos). Underneath, GET /api/location and GET /api/fs/list return HTTP 500 caused by mkdir on a shell path containing 40 null bytes. Same commands work in /tmp and ~.
Observe failure. Control case: cd /tmp && opencode run "diga ok" succeeds.
Expected Behavior
opencode opens with working directory /home/marcos/Projetos/fingerprint-manager, session_move to that directory succeeds, and /api/location + /api/fs/list return 200.
Actual Behavior
TUI with --standalone aborts: UnknownError: An error occurred in Effect.tryPromise ... ClientError: UnexpectedStatus {"status":500}
opencode run in project dir → Error: UnexpectedStatus
session_move to project dir → Unable to move session to /home/marcos/Projetos/fingerprint-manager
Server log shows: session move destination unavailable directory=/home/marcos/Projetos/fingerprint-manager
Additional Context
Server log excerpts (~/.local/share/opencode/log/opencode.log):
cause="TypeError: The argument 'path' must be a string, Uint8Array, or URL without null bytes. Received \"/home/marcos/.local/share/opencode/shell/\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\"
at mkdir (unknown)
at mkdir (node:fs/promises:247:21)"
http.method=GET http.url=/api/fs/list http.status=500
Same 40-null-byte path in both endpoints. Consistently reproducible for this directory (tried opencode, opencode ./, opencode /abs/path, --standalone, run, session_move, service restart). Works in /tmp and /home/marcos. No workaround found. Possibly related to git repo without origin, but not confirmed — /tmp (non-git) works.
Activity