cx-54cpjv: open subagents in the current workspace right pane
Clicking a subagent should open its chat in the current workspace’s right pane, beside the parent chat. This PR supersedes #20694, whose base #20553 closed unmerged. It reuses the beside-chat design; tiling is outside this change.
Leo’s request:
Look, man, me clicking into these sub-agents, they should just be opening up on the right. Like, what's up with this? We, we sent, you know, sub-agents, this stuff that goes on the session rail. We can just open them up in the right pane. You're not opening up in the right pane. You're adding. You're sending me to a new workspace. Why are you sending me to a new workspace? Don't do that.
Ordinary clicks from transcript cards, Session Info, the summary/list, and Chief rail open or reselect a tab in the current workspace’s right pane. Native routing reuses MainPaneLayout.side, links’ LinkOpenPlacement.paneRight, and the right-neighbor fallback for split layouts. Subagent tracking is scoped to the source tab; existing tabs in other workspaces are not selected. Cmd-click opens an unfocused background tab in the same right pane; explicit context-menu workspace actions remain separate. “View all” sends chat.subagentList and opens or reselects a native tab in that same right pane; its subagents:list reveal displays the full list. Opaque transport names use the task or prompt title, with the ID in hover and accessibility text.
Validation (UI routing; the daemon authorization remains a follow-up):
- Fixed the compile failure by typing the placement closures explicitly and returning the daemon-qualified String pane key.
- Fixed review findings: Home remains the rail anchor after child focus; nested clicks preserve native tab identity; View all uses native right-pane placement; background Cmd-click adds an unfocused tab in the same right pane. Regression coverage includes background tab focus and reveal reuse.
- Removed the unused
openSubagentWorkspacewiring.chat.subagentPaneroutes to the current workspace’s companion pane; explicit workspace placement remains available only through the existingchat.offer.openaction. - All cmux-tui/acpmux changes from the earlier daemon experiment were reverted to
feat-cmux-nextbase in this head. Remote-root subagent authorization therefore retains base behavior and is a known follow-up: a separate PR will add durable transfer-state checks before landed markers and a bounded, non-blocking authorization lookup. - Web run 40508204722 passes 11 fixture/routing/name tests, fixed-waits, layers, design-token ratchets, scoped format/lint, and typecheck (2,860 files). The stable completed-subagent showcase fixture demonstrates opening a second child and reselecting the first.
- Original test-first commit
1ad5e87f: nine regressions executed and failed on basee42c00159fa56b. Prior focused subagent/inspector tests: 87 passed. Broader run: 183 pass, 12 skips, five failures; four passed isolated and the remaining Inspector avatar assertion reproduces on base. - Native compile-check and final capture are being rerun for this split UI-only head; the prior daemon compile/test receipts are intentionally not claimed here.
Risk: navigation now resolves the source Home/chat independently of focus and reuses only its right-hand pane. Remote reopening requires matching session and registry identity. Native capture remains the last evidence item; the PR stays draft until it is attached.
Design reference: private cmux-design-references/apps/claude/live/session-running-with-side-panels.png; companion panes remain beside the transcript. No private user screenshot is included.
Gallery evidence uses the same synthetic fixture on base and this implementation (no private user screenshot). It verifies row labels and click requests; native placement still needs the Mac capture.
| Before | After |
|---|---|
![]() | ![]() |
Changelog
Fixed: Subagent navigation stays beside the parent chat, with readable task names.
Real app
The exact head (0bcc20566114a23001a20c33f9c6c759ae6755af) was built on the fleet as job b3889cb9249eefd6b83f4dfe and captured with the real app. The capture loads a mock chat with two finished subagents, opens Session Info and records its Subagents rows. The capture driver could not click those rows (debug.agent_pane did not address them), so this still shows the rows, not a subagent opened beside its parent; that behaviour is covered by the gallery before/after above and the tests below.
Capture steps-fa0766f545 at 0bcc20566114 (fleet build, text checked for private data)
| Light | Dark |
|---|---|
![]() | ![]() |
Agent session: agent session



