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
opencode attach --dir fails because it tries to change directory on the client instead of the server #8933
When using opencode attach with the --dir flag to connect to a remote server, the command fails because it attempts to change the directory on the local client machine rather than sending the directory path to the server.
The attach command handler calls process.chdir(args.dir) locally before connecting, which fails if the specified directory doesn't exist on the client. Even if it does exist, it passes process.cwd() as the directory to the tui function, so the resolved local path is sent to the server, which is unexpected.
Expected behavior
The --dir flag should be passed to the remote server, which resolves the path relative to where opencode serve was started.
Activity
github-actions commentedon Jan 16, 2026
This issue might be a duplicate of existing issues. Please check:
opencode attach: File path duplicates client's relative directory, causing ENOENT #4967:opencode attach: File path duplicates client's relative directory, causing ENOENTFeel free to ignore if none of these address your specific case.
nyxkrage commentedon Jan 16, 2026
Ah yes, this seems to be a duplicate of the first one listed. I assume it didn't come up in my because I searched for the full ENOENT error?