[PR #6934] fix(tui): directory handling in AttachCommand #12165

Closed
opened 2026-02-16 18:17:05 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6934

State: closed
Merged: No


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

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6934 **State:** closed **Merged:** No --- 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
yindo added the pull-request label 2026-02-16 18:17:05 -05:00
yindo closed this issue 2026-02-16 18:17:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12165