Skip to content

[Bug][Desktop v2] Middle-clicking a subagent opens a separate Not Found window #38949

Closed as not planned

Description

@WhiteGiverMa

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

  1. Open an existing session that contains a completed or running subagent/task card.
  2. Ensure the Desktop v2/new layout is enabled.
  3. Middle-click the subagent/task card.
  4. Observe that a separate OpenCode-like window/page is opened instead of a new tab in the existing window.
  5. Observe Not Found in 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> by packages/session-ui/src/components/basic-tool.tsx.
  • packages/session-ui/src/components/message-part.tsx only intercepts button === 0; middle-click returns before preventDefault() and before the app tab store is used.
  • The Home session list already has an onAuxClick path that calls tabs.addSessionTab().
  • The child URL shape and /server/:serverKey/session/:id route are valid for the normal in-app navigation path.
  • The Desktop Electron shell does not configure a setWindowOpenHandler for 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.

Activity

  1. github-actions commented on Sep 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 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