Skip to content

Create session with specified ID #2159

Closed

Description

@Rhain

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.

Activity

  1. rekram1-node commented on Aug 22, 2025

    @rekram1-node
    Member

    just curious, what is the use case here?

  2. wojons commented on Dec 11, 2025

    @wojons

    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

  3. trexug commented on Jan 25, 2026

    @trexug

    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.

  4. sjawhar commented on Feb 10, 2026

    @sjawhar

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

  5. github-actions commented on Apr 12, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions