diagnose-tui-new

Diagnose: TUI new-chat dialog launches claude when codex selected

Metadata

Statusdone
Assignedagent-961
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelclaude:opus
Created2026-04-28T21:54:23.609586152+00:00
Started2026-04-28T22:02:12.782645228+00:00
Completed2026-04-28T22:15:38.415092753+00:00
Tagsbug,tui,chat, eval-scheduled
Eval score0.90
└ blocking impact0.90
└ completeness0.95
└ coordination overhead0.95
└ correctness0.90
└ downstream usability0.92
└ efficiency0.85
└ intent fidelity0.89
└ style adherence0.95

Description

Description

User reports: in the TUI new-chat dialog, selecting 'codex' as the executor/model launches a claude session instead. The selection is being dropped or the wrong handler is dispatched.

Symptom 2 (likely same code path): when launching the new chat, the TUI flips focus back to the previous chat first, then later switches to the newly-launched chat once it's ready. Jarring two-step focus transition.

Goal

Find the root cause(s) for both symptoms. Likely candidates to investigate:

  • The new-chat dialog handler in the TUI — where it reads the selected executor/model and what it actually passes to chat-launch / IPC.
  • IPC: NewCoordinator / launch-chat command — is the model field being honored, or is dispatcher.model / coordinator.model overriding?
  • Focus state machine: where does the TUI decide which chat tab is active after launch? Is there a default 'switch to most recent done chat' that fires before the new chat is ready?
  • Recent commit 9817f36dd (tui-chat-bar) and fix-tui-new are recent and may be relevant.

Validation

  • Root cause identified for symptom 1 (wrong launcher selected). Specific file + function + line range.
  • Root cause identified for symptom 2 (focus jumps to prev chat then to new chat). Specific file + function + line range.
  • Confirmed whether one fix or two are needed.
  • Reproduction steps documented (so the fix task can verify).
  • Diagnosis posted as task log entries (wg log) — not a separate file.

Depends on

Required by

Log