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]: Allow API clients and agents to open existing sessions as Desktop tabs #53529
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.
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.
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
Thanks for the detailed request! In short: you'd like a supported way for API clients or agents to open one or more existing sessions as Desktop tabs. Each tab would open either in the background or as the active tab, reuse a tab that is already open, and never prompt or run the session. Maintainers will consider it.
Right now Desktop tab state lives only in the client, and Desktop's deep-link handling doesn't cover opening sessions, so there's no way to do this from outside today. It also can't be done as a plugin, because plugins run on the server and can't tell a connected Desktop client which tabs to show.
I’d welcome this for both Desktop and web clients. The team plugin provides one example: an agent creates independent sessions, optionally in separate worktrees, and the user then has to find and open them manually.
The GUI SDK now provides ctx.tabs.open, so a GUI companion could implement this for a plugin. A first-class API would still be useful for scripts, API clients, and server plugins that shouldn’t need to ship GUI code just to request a session tab.
Ideally, OpenCode would handle window targeting, duplicate tabs, and background versus foreground opening consistently. Opening should remain a client-controlled UI action—not prompt, resume, or otherwise execute the session.
Activity
github-actions commentedon Oct 6, 2026
This issue might be a duplicate of existing issues. Please check:
For keybind-related issues, please also check our pinned keybinds documentation: #4997
leetdavid commentedon Oct 8, 2026
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:
opencode://URLs and forwards them to the focused window.window.__OPENCODE__.deepLinksand dispatches anopencode:deep-linkevent./server/:serverKey/session/:id, whereserverKeyis the base64url of the server URL.Nothing in the bundled UI listens for
opencode:deep-linkor readswindow.__OPENCODE__. Soopencode://links have no effect on sessions (the one special case isopencode://console/authorized). This comes from searching the app bundle.If a consumer for
opencode:deep-linkgets added, it could cover the tab-opening action here as well as #44167opencodejr commentedon Oct 27, 2026
Thanks for the detailed request! In short: you'd like a supported way for API clients or agents to open one or more existing sessions as Desktop tabs. Each tab would open either in the background or as the active tab, reuse a tab that is already open, and never prompt or run the session. Maintainers will consider it.
Right now Desktop tab state lives only in the client, and Desktop's deep-link handling doesn't cover opening sessions, so there's no way to do this from outside today. It also can't be done as a plugin, because plugins run on the server and can't tell a connected Desktop client which tabs to show.
Related issues:
open-sessionintent.ryanmeador commentedon Nov 1, 2026
I’d welcome this for both Desktop and web clients. The team plugin provides one example: an agent creates independent sessions, optionally in separate worktrees, and the user then has to find and open them manually.
The GUI SDK now provides
ctx.tabs.open, so a GUI companion could implement this for a plugin. A first-class API would still be useful for scripts, API clients, and server plugins that shouldn’t need to ship GUI code just to request a session tab.Ideally, OpenCode would handle window targeting, duplicate tabs, and background versus foreground opening consistently. Opening should remain a client-controlled UI action—not prompt, resume, or otherwise execute the session.