Create session with specified ID #1433

Open
opened 2026-02-16 17:30:56 -05:00 by yindo · 4 comments
Owner

Originally created by @Rhain on GitHub (Aug 21, 2025).

Originally assigned to: @thdxr on GitHub.

When creating a session, I want to customize the ID by obtaining parameters from the session creation process and use the custom ID to create the session.

Originally created by @Rhain on GitHub (Aug 21, 2025). Originally assigned to: @thdxr on GitHub. When creating a session, I want to customize the ID by obtaining parameters from the session creation process and use the custom ID to create the session.
Author
Owner

@rekram1-node commented on GitHub (Aug 21, 2025):

just curious, what is the use case here?

@rekram1-node commented on GitHub (Aug 21, 2025): just curious, what is the use case here?
Author
Owner

@wojons commented on GitHub (Dec 11, 2025):

When you want to have other scripts run and use opencode but want to set the "session" to something determentic that you can control from somewhere else

@wojons commented on GitHub (Dec 11, 2025): When you want to have other scripts run and use opencode but want to set the "session" to something determentic that you can control from somewhere else
Author
Owner

@trexug commented on GitHub (Jan 25, 2026):

I would like the agent to know its own session ID (or be able to fetch it through an internal tool), such that it can provide its session id to an external MCP tool. The MCP server can use the session ID to identify the "user" when it holds persistent data on behalf of the agent.

@trexug commented on GitHub (Jan 25, 2026): I would like the agent to know its own session ID (or be able to fetch it through an internal tool), such that it can provide its session id to an external MCP tool. The MCP server can use the session ID to identify the "user" when it holds persistent data on behalf of the agent.
Author
Owner

@sjawhar commented on GitHub (Feb 9, 2026):

I'd be happy to contribute this feature. It's mostly already implemented

@sjawhar commented on GitHub (Feb 9, 2026): I'd be happy to contribute this feature. It's mostly already implemented
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1433