tui-cannot-view

TUI: cannot view current/in-progress iteration of retried tasks; iteration switcher unclear

Metadata

Statusdone
Assignedagent-878
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-04-27T21:26:09.526805915+00:00
Started2026-04-27T21:50:18.185351367+00:00
Completed2026-04-27T21:53:28.811373699+00:00
Tagseval-scheduled
Eval score0.76
└ blocking impact0.80
└ completeness0.75
└ coordination overhead0.85
└ correctness0.80
└ downstream usability0.75
└ efficiency0.75
└ intent fidelity0.89
└ style adherence0.80

Description

Description

When a task hits multiple retries (e.g. API errors → kill agent → dispatcher respawns), each retry produces a new agent + transcript. In the TUI you should be able to switch between iterations to see each attempt's log/output. This is broken.

User-reported symptoms (today, on tasks that failed mid-session with claude.ai stream hangs and got recovered via the kill-and-respawn pattern):

  1. Can't switch to the most recent iteration while it's in-progress — UI seems stuck on an earlier completed iteration
  2. OR: switching is possible but the latest-iteration pane shows stale content (the prior attempt's logs with the API errors / disconnection, not the new attempt's)
  3. User isn't sure which of these is actually happening — the UI doesn't make it clear what iteration you're viewing
  4. Earlier related symptom user reported in this same session: 'clicking on the little triangles doesn't rotate through iterations'

Affected tasks today: improve-wg-setup, tui-settings-tab, migrate-agency-tasks — each retried 2-3 times after stream-hang recovery.

Investigation needed first

  1. Which view is this? Likely the task Detail view or the Log view (or both — user said 'in the TUI at least' suggesting it's broader). Confirm where iteration-switching is supposed to live
  2. What are 'iterations' here? Multi-attempt retries (each agent-N for the same task) — distinct from cycle-loop iterations (loop_iteration field on cycle members). Make sure code uses the correct concept
  3. Data source: is the iteration switcher reading from the per-attempt agent dirs (.wg/agents/agent-N/) or from a graph-level attempt history? Are in-progress iterations even indexable until the agent finishes writing its closing log entry?
  4. Triangle rotation bug: what do the triangle controls actually do today? Are they wired to the right data? Does 'next' wrap correctly? Does 'previous' work?
  5. Affordance: how does a user know which iteration they're viewing? Is there a visible indicator (1 of 3 / iteration N / agent-N)?

Desired end state

  • User can navigate between all iterations (completed AND in-progress) of a retried task from the TUI
  • Triangle/key controls actually rotate, including reaching the latest iteration
  • Latest iteration's content updates live as the agent writes (no stale-content trap)
  • UI makes the current-iteration position obvious: '2 of 3' / 'iteration N (in-progress)' / similar
  • Default view on opening a task = most recent iteration

Validation

  • Reproduce the bug first: run a task that gets killed and respawned mid-flight; confirm broken iteration switching in TUI BEFORE fixing
  • After fix: same scenario shows all iterations; triangle navigation reaches each; in-progress iteration content updates live (verify via tail of agent output.log vs what TUI shows)
  • Iteration position indicator visible (1/3, etc.) on every iteration view
  • Latest iteration is the default view when opening a multi-attempt task
  • Manual smoke: kill an in-progress agent, watch dispatcher respawn, confirm TUI shows new iteration immediately and lets you switch back to the killed one to see its API error log
  • cargo build + cargo test pass with no regressions

Depends on

Required by

Log