anomalyco / anomalyco/opencode
[Bug][Desktop v2] Middle-clicking a subagent opens a separate Not Found window
@Brendonovich is already working on this.
Since Jul 26, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
In the Desktop v2 interface, middle-clicking a subagent/task card does not open the child session as a new OpenCode tab while keeping the parent tab. Instead, it opens a separate OpenCode-like window/page and displays Not Found.
A normal click can navigate to the child session in the current app. The failure is specific to the middle-click/new-tab path.
Plugins
oh-my-openagent (v4.19.1, personally forked)
OpenCode version
1.18.4
Steps to reproduce
- Open an existing session that contains a completed or running subagent/task card.
- Ensure the Desktop v2/new layout is enabled.
- Middle-click the subagent/task card.
- Observe that a separate OpenCode-like window/page is opened instead of a new tab in the existing window.
- Observe
Not Foundin the new window/page.
Expected behavior
The parent session remains available in its current tab, and the child session opens in a new OpenCode tab in the same Desktop window, matching the behavior of middle-clicking a session from the Home session list.
Actual behavior
The native link behavior escapes the in-app tab system and opens a separate window/page. The new page cannot render the child route and shows Not Found.
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
OpenCode Desktop (not applicable)
Additional context
This appears to be a stock OpenCode GUI issue rather than an oh-my-openagent issue:
- The task card is rendered as a native
<a>bypackages/session-ui/src/components/basic-tool.tsx. packages/session-ui/src/components/message-part.tsxonly interceptsbutton === 0; middle-click returns beforepreventDefault()and before the app tab store is used.- The Home session list already has an
onAuxClickpath that callstabs.addSessionTab(). - The child URL shape and
/server/:serverKey/session/:idroute are valid for the normal in-app navigation path. - The Desktop Electron shell does not configure a
setWindowOpenHandlerfor this native middle-click path.
Potential fix: handle middle-click/auxclick on the task card and add the child session through the existing app tab store, then add a Desktop v2 regression test covering parent-tab preservation and child-tab opening.
Related reports/changes: #34808, #35577, #15077, and the middle-click feature added in v1.17.19.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.