Repository navigation
chat: open the chat's session in the agent's own CLI, or copy its id - #74
Merged
Merged
Conversation
Both ACP adapters keep the agent's own session id as the ACP one:
claude-agent-acp hands it to the Claude Agent SDK as `sessionId`, and
`opencode acp` returns opencode's `ses_...` id. So a connector's new
`resume` template -- `claude --resume {sessionId}`, `opencode -s {sessionId}`,
settable (or cleared) as `resume` in a connectors file -- opens the very
session the chat is in.
The session header gains two buttons: open in the agent's CLI (a VS Code
terminal in the session's directory, where Claude Code looks its sessions
up) and copy the session id. A connector without a `resume` command copies
the id instead and says so. `native-session.ts` holds the opening, for the
run's agents to share.
Claude-Session: https://claude.ai/code/session_01N33eMqpCzhDs8HDNez3Yja
This was referenced Oct 14, 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.
Both ACP adapters reuse the agent's own session id as the ACP session id. I checked both:
claude-agent-acphands the ACP id to the Claude Agent SDK asoptions.sessionId, so the session is the oneclaude --resume <id>opens.opencode acpsession over ACP; itsses_…id appeared under that same id inopencode session list. The probe session was deleted afterwards.Changes:
resumetemplate. It's built in forclaude(claude --resume {sessionId}) andopencode(opencode -s {sessionId}), and a connectors file can set or clear it withresume = "...".resumeCommandForfills in the id and shell-quotes it when needed.resumecommand, opening copies the id instead and says why. If the session's directory is gone, the terminal opens anyway with a warning.native-session.tsholds the opening logic so the run's agents can reuse it (follow-up).Tests:
native-session.test.ts: the templates, quoting, connectors-file override, terminal directory, missing directory, copy fallback.chat-runtime-native-session.test.ts.chat-panel-native-session.test.ts.https://claude.ai/code/session_01N33eMqpCzhDs8HDNez3Yja