Skip to content

[FEATURE]: Allow API clients and agents to open existing sessions as Desktop tabs #53529

Description

@cveld

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

OpenCode's API can create, move, and prompt sessions, but it cannot ask the Desktop client to expose an existing session as a visible tab. Desktop tab state is client-local, so automated workflows can prepare sessions but still require the user to find and Ctrl+click each one on Home.

Please add a supported mechanism—such as a Desktop API action, deep link, or UI intent—to open one or more existing sessions as Desktop tabs.

Suggested semantics:

{
  "sessions": [
    { "sessionID": "ses_...", "background": true }
  ]
}
  • background: true: add the tab while keeping the current tab active.
  • background: false: add and activate the tab.
  • Accept multiple sessions in one request.
  • Reuse/focus an already-open tab instead of creating a duplicate.
  • Opening a tab must not prompt, resume, or otherwise execute the session.
  • The Desktop client should validate that the session belongs to its configured server and is accessible.

Use case: an agent inventories multiple worktrees, creates or organizes one session per work item, and prepares them as visible Desktop tabs for the user to review and continue interactively. Creating server-side session records alone does not complete this workflow.

Related:

Activity

  1. github-actions commented on Oct 6, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #44167: Requests a deep link to open a specific existing session in OpenCode Desktop, overlapping with opening existing sessions as Desktop tabs.

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  2. leetdavid commented on Oct 8, 2026

    @leetdavid

    Adding one concrete use case here:

    I use Linear and Opencode for my work, and Linear supports a custom script to create session. Nothing will open it in Desktop currently, so I need to open it by hand.

    What already exists:

    • The main process accepts opencode:// URLs and forwards them to the focused window.
    • The renderer bootstrap stores them in window.__OPENCODE__.deepLinks and dispatches an opencode:deep-link event.
    • The bundled UI has the session route /server/:serverKey/session/:id, where serverKey is the base64url of the server URL.

    Nothing in the bundled UI listens for opencode:deep-link or reads window.__OPENCODE__. So opencode:// links have no effect on sessions (the one special case is opencode://console/authorized). This comes from searching the app bundle.

    If a consumer for opencode:deep-link gets added, it could cover the tab-opening action here as well as #44167

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