opencode
opencode copied to clipboard
fix(tui): directory handling in AttachCommand
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