cmux NEXT: keep ambiguous child starts in shell rows
Bash commands that invoke Codex or Claude keep their command and output rows. A child-session record may create an agent card only when its shell start is unambiguous; concurrent starts cannot borrow another child's identity, model or reply.
Repair for #26368's independent review BLOCK at b54463253a1a48eb707dd691b7c9206653115cfe. This branch starts from feat-cmux-next at 83c919d5176a669a6a1ab84cab7414727eb623a3 and ports only the original PR's three own commits, then adds the regression and repair. The original branch and its merge history remain preserved.
Leo, 2026-10-27: "we don't want to have that sort of thing going on"
Takes back #25043: command syntax and stdout must not establish harness or session identity. Explicit child-session metadata still supplies the harness, model, effort, session id and reply for an unambiguous tracked start.
The daemon lowercases and splits requested names before claiming base, base-2, base-3; the fold mirrors that normalization before comparing rename families. The current child records carry no reliable originating call id. Overlapping parent shell starts therefore stay plain when their names or prompts overlap, even if a competing call later ends; distinct explicit names remain deterministic. An active start_session disqualifies only overlapping shell candidates. Once that MCP call completes, its identity tombstone still rejects a same-name or same-prompt queued child that arrives late, while a genuinely distinct parent remains cardable. An explicit -n fix can no longer consume a fix-2 record through prompt fallback. Discarded calls cannot become candidates again through repeated updates.
Validation: cd webviews && bun test src/agent-session/acpmux/subagents/agentRunFold.test.ts test/shell-agent-identity.test.ts reproduced 3 normalization failures against prior head 58e6064ee8bc7caa87f895ab2dc06f67283d6a6d and passes 33 tests at the final head 89e21311eb06a3d5b182a8647c9428bf6b151dd1. The broader focused fold, parser, MCP and transcript replay suite passes 68 tests. scripts/web-lint.sh and python3 scripts/cmux-next/prepush-gate.py pass.
Observed / Not run
Observed concurrent same-name shell/MCP starts in both start orders and all three MCP input shapes, two background parent runs in both child orders, two background runs plus start_session, a queued MCP first prompt, a native subagent's competing MCP start, and repeated updates after competing calls fail. Existing tests retain exact recorded metadata and ordinary shell command/output rows.
python3 scripts/verify-local.py previously passed all selected checks except localization parity, which reports 45,327 errors in catalogs and localization inputs unchanged from base 83c919d5176a669a6a1ab84cab7414727eb623a3. No native build, app dogfood, live review-router call or new browser capture ran for this attribution repair.
Preserved visual evidence from #26368: hosted Chromium capture 40590006683 covered running/completed light/dark gallery states at original regression c65b829f88eddf7f98df737258404a58b102de36 and original fixed head 4d7bb4943641e44792ba5f0460369c6de1144345. Those captures document the original shell-row change; the concurrency repair is verified by the new protocol regressions above.
Reference: cmux-design-references/apps/claude/live/transcript-tool-rows-and-task-list.png and apps/codex/live/transcript-expanded-command-activity.png for shell rows; apps/claude/live/transcript-linked-session-card.png for a tracked session card.
Gallery: agent-pane.shell-agent-identity/running, agent-pane.shell-agent-identity/completed
Size: This repair PR carries the original shell-row implementation and preserved gallery captures so the exact-head repair can be reviewed from current feat-cmux-next in one self-contained change.
Changelog
Fixed: Bash commands keep their normal rows, and ambiguous concurrent starts cannot inherit another child session's identity.
| State | Before | After |
|---|---|---|
| Running · dark | ![]() | ![]() |
| Completed · dark | ![]() | ![]() |
| Running · light | ![]() | ![]() |
| Completed · light | ![]() | ![]() |
Agent session: agent session







