Symptom
The footer prints one elapsed time twice:
using tool 22m 39s · 1 shell, ⏱ 2 scheduled · worked 22m 39s
Founder: "we consistently have the same timer twice."
It is not constant. An earlier session showed sub-agents underway 13m 11s … worked 27m 36s — different, and both useful.
Cause
working_clock in crates/tui/src/tui/phase_strip.rs:1095 returns two halves from the same base:
let turn = app.turn_started_at.map(|started| started.elapsed());
// turn half: "{phase_label} {turn}"
let worked = app
.cumulative_turn_duration
.saturating_add(turn.unwrap_or_default());
// session half: "worked {worked}"
cumulative_turn_duration is the sum of finished turns. On the first turn of a session it is zero, so worked == turn exactly, and the two chips render the identical string. The doc comment above the function already describes the session clock as "the sum of finished turns plus the live turn" — on turn one there are no finished turns, so the second chip is tautological.
That is why it collides on a long first turn (22m 39s here) and separates later: the 13m/27m screenshot was a session that already had ~14m of completed turns behind it.
The CLOCK_SESSION_FLOOR_SECS = 60 floor makes it more visible, not less — the chip only appears once the turn passes a minute, which on a first turn is precisely when it starts duplicating.
Suggested fix
Suppress the session half while it carries no information beyond the turn half — when cumulative_turn_duration.is_zero(), or more defensively when the two formatted strings are equal. The turn half is the more informative of the two (it names the phase: using tool, sub-agents underway, waiting on you), so the worked chip is the one to drop.
Keep both as soon as a turn has finished, which is when worked starts saying something the turn clock cannot.
Evidence
crates/tui/src/tui/phase_strip.rs:1095-1131, screenshot from the founder's 0.9.13 dogfood session.
Milestone is a guess — filed into the 0.9.13 line as requested; move it if the release scope is closed.
Symptom
The footer prints one elapsed time twice:
Founder: "we consistently have the same timer twice."
It is not constant. An earlier session showed
sub-agents underway 13m 11s … worked 27m 36s— different, and both useful.Cause
working_clockincrates/tui/src/tui/phase_strip.rs:1095returns two halves from the same base:cumulative_turn_durationis the sum of finished turns. On the first turn of a session it is zero, soworked == turnexactly, and the two chips render the identical string. The doc comment above the function already describes the session clock as "the sum of finished turns plus the live turn" — on turn one there are no finished turns, so the second chip is tautological.That is why it collides on a long first turn (22m 39s here) and separates later: the 13m/27m screenshot was a session that already had ~14m of completed turns behind it.
The
CLOCK_SESSION_FLOOR_SECS = 60floor makes it more visible, not less — the chip only appears once the turn passes a minute, which on a first turn is precisely when it starts duplicating.Suggested fix
Suppress the session half while it carries no information beyond the turn half — when
cumulative_turn_duration.is_zero(), or more defensively when the two formatted strings are equal. The turn half is the more informative of the two (it names the phase:using tool,sub-agents underway,waiting on you), so theworkedchip is the one to drop.Keep both as soon as a turn has finished, which is when
workedstarts saying something the turn clock cannot.Evidence
crates/tui/src/tui/phase_strip.rs:1095-1131, screenshot from the founder's 0.9.13 dogfood session.Milestone is a guess — filed into the 0.9.13 line as requested; move it if the release scope is closed.