opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(tui): directory handling in AttachCommand

Open aryasaatvik opened this issue 1 week ago • 2 comments

Fixes ENOENT errors when attaching to remote opencode servers.

The v1.1.1 attach command always sent the client's cwd to the server via x-opencode-directory header. For remote servers, this path doesn't exist, causing MCP connections, bash tool and more execution to fail with ENOENT. Now directory is only sent when --dir is explicitly provided, letting the server use its own cwd by default.

related #6715

aryasaatvik avatar Jan 05 '26 11:01 aryasaatvik