fix(tui): restore attach session lookup behavior#7150
Merged
rekram1-node merged 1 commit intoanomalyco:devfrom Jan 7, 2026
Merged
fix(tui): restore attach session lookup behavior#7150rekram1-node merged 1 commit intoanomalyco:devfrom
rekram1-node merged 1 commit intoanomalyco:devfrom
Conversation
Only send directory header when --dir is explicitly provided. Otherwise, let the server fall back to its own working directory. Fixes anomalyco#7149
Contributor
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
3 tasks
shuv1337
added a commit
to Latitudes-Dev/shuvcode
that referenced
this pull request
Jan 9, 2026
The attach command now always passes client's cwd to the server via x-opencode-directory header. This was a fork-specific enhancement that regressed during upstream merge (PR anomalyco#7150, commit dee0226). Ensures file autocomplete, theme discovery, and exports use the client's directory when attaching to a remote server, not the server's launch dir. Fixes #283
triklozoid
pushed a commit
to triklozoid/opencode
that referenced
this pull request
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes regression where
opencode attach --sessionfails with "Session not found" when run from a different directory than where the session was created.The issue
PR #6715 (commit 401b498) introduced a regression by always sending
process.cwd()as the directory context. Sessions are stored per-project, so when the client's cwd differs from the session's directory, lookup fails.The fix
Only send the directory header when
--diris explicitly provided. Otherwise, let the server fall back to its own working directory (the pre-v1.1.1 behavior).Fixes #7149