diff --git a/frontend/packages/agent/src/app.js b/frontend/packages/agent/src/app.js index 48d33a6c..e1f3881d 100644 --- a/frontend/packages/agent/src/app.js +++ b/frontend/packages/agent/src/app.js @@ -2011,12 +2011,17 @@ window.marked = marked; // Bare `status` ticks (claude's own generic "still working" signal, // no detail beyond the label) — collapse consecutive ticks into one // updating row instead of a fresh note each (see `makeCoalescer` - // above). These are the only signal we get during a compaction pass - // (no dedicated "compacting…" event from claude), so without - // collapsing a compaction looked like a wall of identical `⚙ status` - // rows followed by silence. + // above). When the harness state is `compacting` (set by the + // `turn_state_changed` SSE event), show elapsed time via `stateSince` + // — the same source the state badge uses — so the terminal reflects + // compaction progress; otherwise fall back to the generic label. if (v.subtype === 'status') { - updateStatus(api, '⚙ status'); + let label = '⚙ status'; + if (stateName === 'compacting') { + const elapsed = Math.round((Date.now() - stateSince) / 1000); + label = '⚙ compact · ' + elapsed + 's…'; + } + updateStatus(api, label); return; } // Other system subtypes (context_window_exceeded, etc.) — render a