fix-tui-new

Fix: TUI new-chat launches wrong executor + jarring focus jump

Metadata

Statusdone
Assignedagent-970
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelclaude:opus
Created2026-04-28T21:54:33.356628557+00:00
Started2026-04-28T22:19:01.887861251+00:00
Completed2026-04-28T22:41:33.095113574+00:00
Tagsbug,tui,chat, eval-scheduled
Eval score0.60
└ blocking impact0.50
└ completeness0.52
└ coordination overhead0.75
└ correctness0.62
└ downstream usability0.75
└ efficiency0.68
└ intent fidelity0.46
└ style adherence0.42

Description

Description

Fix two bugs in the TUI new-chat dialog flow, identified by the diagnose-tui-new task:

  1. Selecting 'codex' (or any non-claude executor/model) launches a claude session instead.
  2. After launching, the TUI focus first flips to the previously-active chat, then later jumps to the new chat once it's ready. Should be: stay on current view (or show launching placeholder for the new chat) and switch to the new chat exactly once when it's ready.

Read the diagnose-tui-new task log for the root cause(s) and the specific files/lines.

Validation

  • Failing smoke test or live test added that captures both symptoms (or one combined test if same code path)
  • Symptom 1: launching codex from the TUI new-chat dialog produces a codex worker process (verify with WG_EXECUTOR_TYPE=codex in the spawned env, or by inspecting wg agents output)
  • Symptom 2: focus does NOT briefly flip to the previous chat. Either stays on current, or transitions once to the new chat when it's ready.
  • cargo build + cargo test pass with no regressions
  • Manually verified in a live TUI session (record steps in task log)
  • cargo install --path . was run before claiming done (per CLAUDE.md)

Depends on

Required by

Log