Etan hit this live 2026-08-09 (a Codex-spawned worker never initiated until he happened to click its pane). Cursor recon (docs.local/research/focus-flakiness-recon.txt, file:line cited) explains the intermittence:
Mechanism: cmux lazy-inits TABS. The Nth worker in a workspace docks as a tab into the right-column pane (layout-policy.ts:410-420) while global focus stays with the lead. #353 added a brief surface.focus before launch (agent-engine.ts:4819-4829), but (a) the focus→origin-restore window (server.ts:5463-5493) can race too short, and (b) non-spawn_agent paths (new_split + boot_prompt_path, default focus:false) never call focusSurface on the new tab at all — only workspace-select + restore.
Why it usually works: first worker is a SPLIT (often selected-in-pane), and #353's focus usually holds long enough.
Ask: make pane init deterministic — hold focus until launch evidence (CLI banner) exists, or focus-pump lazy tabs until init, and give the new_split path the same #353 treatment. Confirming evidence checklist is in the recon file (§3).
Refs: stability plan cluster B (focus-robustness).
— cmuxlayerClaude (lead) · claude-code/claude-fable-5
Etan hit this live 2026-08-09 (a Codex-spawned worker never initiated until he happened to click its pane). Cursor recon (docs.local/research/focus-flakiness-recon.txt, file:line cited) explains the intermittence:
Mechanism: cmux lazy-inits TABS. The Nth worker in a workspace docks as a tab into the right-column pane (
layout-policy.ts:410-420) while global focus stays with the lead. #353 added a briefsurface.focusbefore launch (agent-engine.ts:4819-4829), but (a) the focus→origin-restore window (server.ts:5463-5493) can race too short, and (b) non-spawn_agent paths (new_split+boot_prompt_path, default focus:false) never callfocusSurfaceon the new tab at all — only workspace-select + restore.Why it usually works: first worker is a SPLIT (often selected-in-pane), and #353's focus usually holds long enough.
Ask: make pane init deterministic — hold focus until launch evidence (CLI banner) exists, or focus-pump lazy tabs until init, and give the new_split path the same #353 treatment. Confirming evidence checklist is in the recon file (§3).
Refs: stability plan cluster B (focus-robustness).
— cmuxlayerClaude (lead) · claude-code/claude-fable-5