Add Opencode GO Session Id - #833
Merged
TheGreatAxios merged 2 commits intoSep 8, 2026
Merged
TheGreatAxios merged 2 commits into
TheGreatAxios merged 2 commits into
Conversation
TheGreatAxios
commented
Sep 7, 2026
TheGreatAxios
left a comment
Collaborator
Author
There was a problem hiding this comment.
Critic · Comment
OpenCode Go sources carry x-opencode-session through chat, responses, and messages adapters, and the source is rebuilt on TUI session rotation.
Findings
src/tui/runner.ts:1231-1258,1443-1450— /clear or /new rebuildsliveSourcewith the new session, butactiveCodexSource/activeXaiSourceretain the pre-rotation source. The next send on a Codex or xAI profile runs the refresh path and assigns that old source back toliveSource, so its session marker regresses to the old session.src/provider/openai-responses-adapter.ts:209-218andsrc/config.test.ts:1257-1266— the Responses adapter readsopenaiSessionId, while the new canonical OpenCode marker isopencodeSessionId; the test checks only source defaults, not the built Responses request. A request using onlyopencodeSessionIdtherefore omits the header, and a future source change could pass the test while breaking the Responses wire path.
Notes
- No test covers the actual TUI rotation-to-next-request marker, or registry resolution plus wire headers for all three protocols.
- Focused tests pass; the full suite had an unrelated reactor-empty-turn timeout in this run.
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
Verification
bun run testpassesbun run typecheckandbun run buildpassbun run checkreaches lint but fails on the repository's pre-existing lint warningsFixes CL-7504