Skip to content

fix(coding-agent): finished sessions no longer stay 'running' in the agents view when the summarizer verdict never changes - #1985

Merged
sethkarten merged 1 commit into
mainfrom
fix/roster-activity-republish
Sep 3, 2026
Merged

fix(coding-agent): finished sessions no longer stay 'running' in the agents view when the summarizer verdict never changes#1985
sethkarten merged 1 commit into
mainfrom
fix/roster-activity-republish

Conversation

@snimu

@snimu snimu commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Symptom

A finished top-level agent could sit in the agents view's Running section forever, labeled classifying, even though it stopped working long ago. On setups where the summary model returns the same (or an empty) verdict every time, every finished agent got stuck this way.

Cause

The agents view trusts the roster row it is pushed. The roster row is republished only when the session summarizer's settle gate decides something changed — and that gate compared just the verdict text and task state. A settle that produced the same text at a new message count silently refreshed the summary's currency (basedOnMessageCount), which is exactly what flips the activity derivation from working to idle — but because the text was unchanged, no notification fired, no flush ran, and the last-published row stayed frozen at working/running.

Fix

One predicate term in the settle gate (daemon-session-summarizer.ts): an idle settle that refreshes currency now counts as a status change and notifies, so the roster republishes the row and the view flips to Idle through the existing session_status → flush wiring. Working-state refreshes with unchanged text stay quiet, so the periodic sweeps add no broadcast noise. No new publish path, no polling.

Also deletes the dead agentStatusChanged export — a zero-caller duplicate of the old two-field predicate that had already drifted.

Validation

  • Producer pin (fails on main): an idle settle with unchanged verdict text still notifies — its currency drives the roster.
  • Quiet-guard pin: a working refresh with unchanged text does not notify.
  • Integration pin in the worker-roster-reporter harness: a row published working republishes idle once the settled verdict makes the summary current.
  • Suites: 575 passed / 8 skipped across 19 files (agents-view*, agent-roster, daemon-agent-roster, daemon-session-list, all daemon-supervisor-*, daemon-mode, summarizer); root npm run check green.
  • Net src: +6/−9.

Credit: diagnosed independently by Vincent Bailly (VincentBailly#8), whose fork carries a consumer-side workaround; with this producer fix his patch can be dropped per its own deletion procedure.

Linear: https://linear.app/primeintellect/issue/res-1252

A finished top-level agent stayed in the agents view Running section as
"classifying" forever: the roster's activity axis holds an idle session
at "working" until its summarizer verdict is current, but the summarizer
only notified (and thereby scheduled a roster flush) when the verdict
TEXT or task state changed. A settle that produced the same text at a
new message count updated the verdict's currency without ever
republishing the row, freezing rosterStatus at "running" with the
"classifying" label.

The change gate now treats an idle settle that refreshes
basedOnMessageCount as a status change; working refreshes with unchanged
text stay quiet. The dead agentStatusChanged export duplicated the old
two-field predicate (with no production caller) and is deleted.

Diagnosis credit: Vincent Bailly (VincentBailly#8), whose
consumer-side workaround this producer fix supersedes.

RES-1252
@snimu snimu changed the title fix: publish roster rows when the idle verdict currency changes fix(coding-agent): finished sessions no longer stay 'running' in the agents view when the summarizer verdict never changes Sep 2, 2026
@sethkarten
sethkarten self-requested a review September 3, 2026 15:17
@sethkarten
sethkarten merged commit 4f30152 into main Sep 3, 2026
24 of 28 checks passed
@sethkarten
sethkarten deleted the fix/roster-activity-republish branch September 3, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants