fix(coding-agent): finished sessions no longer stay 'running' in the agents view when the summarizer verdict never changes - #1985
Merged
Conversation
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
sethkarten
self-requested a review
September 3, 2026 15:17
sethkarten
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fromworkingtoidle— but because the text was unchanged, no notification fired, no flush ran, and the last-published row stayed frozen atworking/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 existingsession_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
agentStatusChangedexport — a zero-caller duplicate of the old two-field predicate that had already drifted.Validation
workingrepublishesidleonce the settled verdict makes the summary current.npm run checkgreen.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