fix(coding-agent): reconcile completed worker status - #1872
Closed
johnrichardrinehart wants to merge 1 commit into
Closed
johnrichardrinehart wants to merge 1 commit into
johnrichardrinehart wants to merge 1 commit into
Conversation
Resident subagent summaries derive activity from live session fields. A child can retain stale streaming or pending-tool state after its RLM lifecycle is persisted as complete. Agent messaging and observation then disagree with the RLM registry and the agents view. Read the per-child lifecycle record before creating resident summaries. Treat completed or deleted lifecycle states as terminal while preserving the live session for transcript inspection and later messages.
|
Hi @johnrichardrinehart, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/PrimeIntellect-ai/prime-agent/blob/main/CONTRIBUTING.md for more details. |
Author
|
Moved the report and tested patch to the required intake path: #1873 |
VincentBailly
pushed a commit
to VincentBailly/prime-agent
that referenced
this pull request
Sep 2, 2026
… section Fork-local workaround. Do not merge upstream. Delete it once upstream classifies finished agents correctly. Finished agents stay in the agents-view Running section forever. The supervisor ledger only re-publishes a roster row when the summarizer verdict text changes, so a finished agent keeps activity "working" (label "classifying") and a frozen rosterStatus "running". This guard trusts "running" only when a hard busy signal still backs it. Greppable marker sites (both carry the marker LOCAL PATCH(agents-view-done-in-running)): packages/coding-agent/src/modes/agents-view/agents-view-state.ts packages/coding-agent/test/agents-view-done-in-running.test.ts Drop test, one command: delete the guard block in agents-view-state.ts, then run npx vitest --run packages/coding-agent/test/agents-view-done-in-running.test.ts If it still passes without the guard, upstream fixed the bug: delete the guard block AND the whole test file. Upstream refs: PrimeIntellect-ai#1873, PrimeIntellect-ai#1872, PrimeIntellect-ai#1967. Caused by 8d5722e / 1d2e91d.
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.
Problem
A completed resident RLM child can retain stale in-memory streaming or pending-tool state.
rlm.list_subagents()then reportscompleted, whileagent_message.list_agents()reportsrunningandagent_observereports an active tool stream.Fix
Read the persisted per-child lifecycle record before creating resident agent summaries. A terminal lifecycle now overrides stale execution fields:
agent_messagereports the child as inactive and not streaming.agent_observereports the child as idle, inactive, and not streaming.Passive child behavior is unchanged.
Validation
npm run checkpackages/coding-agent/test/daemon-mode.test.ts: 199 passedNote
Fix completed resident subagents appearing active in
AgentDaemonobserve and message APIsAgentDaemon.readResidentRlmLifecycleStatusto read the persisted subagent display entry and confirm therlmChildIdmatches before trusting the status.createAgentObserveSummary,createAgentObserveAgentSnapshot,createAgentObserveRecentMessages,createAgentMessageAgentSummary, and their callers now pass the persisted lifecycle status through; when it iscompletedordeleted, they forceidle/inactive, clearisStreaming,isCompacting,unfinishedActionCount, andqueuedCount.readResidentRlmLifecycleStatuscannot find or match the entry it falls back to the prior in-memory classification, so a missing or stale file could still show a completed worker as active.Macroscope summarized ad1364e.