You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Select and reference another session's context in OpenCode V2 #53933
This is a follow-up for a user-facing workflow in OpenCode V2. I am explicitly linking the earlier request rather than claiming this general idea has never been suggested.
Describe the enhancement you want to request
Please provide a built-in way to select an existing session and reference its relevant context from the current session.
Problem and use case
When work is split across sessions, an earlier session may contain the reasoning behind an architectural choice, debugging findings, or important constraints that are not captured in the code. I want to reuse that context while continuing a separate task in the current session, without manually copying messages, exporting/importing the conversation, or implementing a custom tool.
For example, after discussing an authentication approach in session B, I would like to select B from session A and ask: "Use the approach and constraints discussed in this session to implement the next step."
Desired workflow
In session A, search for and select an existing session B by title or identifier.
Include a reference to B with the current prompt.
Let the agent retrieve relevant messages, decisions, and constraints from B as needed, without automatically inserting B's entire history into every prompt.
A session picker, menu action, or command would all be reasonable. This request does not require @ syntax.
The scope is explicit, user-selected reuse of historical context. The current session should remain a separate conversation; automatic long-term memory and live messaging between agents are outside this request.
Related request
#3227 proposed referencing another session using @ and is currently closed. Its discussion suggested custom tools built on the SDK. The request here is for a discoverable, built-in V2 workflow that avoids requiring users to build that integration themselves.
If V2 already supports this workflow, a pointer to the intended interaction and documentation would also resolve the request.
Thanks for the detailed request, and for linking the earlier discussion!
To restate it: you'd like a built-in way in OpenCode V2 to pick an existing session (by title or ID) from the current session and attach it as a reference. The agent would then pull in only the relevant decisions, findings and constraints from that session when it needs them, without copying its whole history into every prompt, and the two conversations would stay separate.
As far as I can tell, V2 doesn't have a built-in workflow for this yet. A plugin can add a tool that reads a session if it already knows the session ID. But the plugin API currently has no way to list or search sessions, and no hook for attaching a session from a picker, so a plugin can't fully provide what you describe. Maintainers will consider the request.
Activity
opencode-agent commentedon Oct 8, 2026
Thanks for the detailed request, and for linking the earlier discussion!
To restate it: you'd like a built-in way in OpenCode V2 to pick an existing session (by title or ID) from the current session and attach it as a reference. The agent would then pull in only the relevant decisions, findings and constraints from that session when it needs them, without copying its whole history into every prompt, and the two conversations would stay separate.
As far as I can tell, V2 doesn't have a built-in workflow for this yet. A plugin can add a tool that reads a session if it already knows the session ID. But the plugin API currently has no way to list or search sessions, and no hook for attaching a session from a picker, so a plugin can't fully provide what you describe. Maintainers will consider the request.
Related issues:
@(closed)