Skip to content

feat(coding-agent): shared agent-status classifier, honest worker visibility, subagents bar rename - #1895

Merged
xeophon merged 4 commits into
mainfrom
feat/agent-roster-classifier
Sep 1, 2026
Merged

feat(coding-agent): shared agent-status classifier, honest worker visibility, subagents bar rename#1895
xeophon merged 4 commits into
mainfrom
feat/agent-roster-classifier

Conversation

@snimu

@snimu snimu commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Part 1 of 3 for ENG-5794 (https://linear.app/primeintellect/issue/ENG-5794). Stack: this PR -> roster ledger (daemon-internal) -> subscription push + TUI consumption.

Summary

  • add classifyAgentStatus, one pure status formula (running/idle/inactive) shared by every agent surface; the agents-view classifier (classifySessionRosterStatus) and the subagents-bar formula (countDirectSubagentStatuses) become thin adapters over it, so the two surfaces can no longer disagree on what a status means
  • stop hiding sessions of non-ready workers: heavy RLM load flips a worker to recovering, which previously made the entire running family vanish from the agents view; the worker state now renders as the row's status label instead
  • resident 0-message subagent sessions are live instead of draft-hidden: a spawned worker is visible from creation, before its first message lands (top-level drafts stay message-based; on-disk drafts of dead subagents are unaffected)
  • rename the bar label agents -> subagents

Validation

  • adversarial review enumerated the full old-vs-new input space for both adapters: zero status deltas; the in-process-residency nuance (activity implies a live session; in-process connections never stamp activeSessionId) verified against all snapshot builders
  • new tests: classifier truth table, formula-equality property across both adapters, non-ready-worker visibility+label pin, resident 0-message subagent pin; mutants (classifier precedence inversion, queued-as-idle, restored hiding clause) each killed by a named test
  • sandbox: scoped suites 108/108; blast radius (agents-view-mode, daemon-mode, daemon-list-format, interactive-mode-status, +2) 399 passed; root npm run check green

Note

Medium Risk
Changes agents-view visibility and lifecycle rules for subagents and non-ready workers; any code assuming those rows stay hidden will behave differently, though roster classification for existing inputs is intended to be unchanged.

Overview
Unifies running / idle / inactive behind a single classifyAgentStatus helper so the agents view and subagent summary bar use the same rules (including queued children counting as running before a session exists).

Agents view behavior changes: live sessions stay visible when the worker is starting, recovering, stopping, or failed (no longer filtered to workerState === "ready"); those rows show the worker state as the status label. Spawned subagents are live as soon as they are resident, even with zero messages—top-level empty sessions remain drafts.

The chat subagent summary bar label is renamed from agents to subagents, with border layout adjusted for the longer label.

Reviewed by Cursor Bugbot for commit ee28dc7. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add shared classifyAgentStatus classifier and show subagents from creation in agents view

  • Introduces classifyAgentStatus in agent-roster.ts as the single status formula across daemon session lists and subagent summary lines, replacing bespoke per-field logic.
  • Removes the workerState gate from shouldShowAgentsViewSession in agents-view-state.ts, so live sessions with non-ready worker states (starting, recovering, stopping, failed) are now visible instead of hidden; those states surface directly as the status label.
  • Treats resident subagent sessions as live immediately upon creation in activeLifecycleForSession in daemon-session-list.ts, before any message is sent.
  • Renames the summary bar label from 'agents' to 'subagents' in subagent-summary-line.ts and adjusts border width calculation accordingly.
  • Behavioral Change: sessions previously hidden during worker startup/recovery are now visible with their raw worker state as the status label; subagent sessions appear as live from creation rather than draft.

Macroscope summarized ee28dc7.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8ecf7b0. Configure here.

Comment thread packages/coding-agent/src/modes/daemon/daemon-session-list.ts Outdated
Comment thread packages/coding-agent/src/modes/agents-view/agents-view-state.ts Outdated
snimu added a commit that referenced this pull request Aug 29, 2026
… changelog fragment

Addresses PR #1895 review: SessionRosterStatus was an alias with no
external importers, and the visibility comment restated the code.

ENG-5794
snimu added a commit that referenced this pull request Aug 31, 2026
… changelog fragment

Addresses PR #1895 review: SessionRosterStatus was an alias with no
external importers, and the visibility comment restated the code.

ENG-5794
@snimu
snimu force-pushed the feat/agent-roster-classifier branch from 05960ed to 8dd6901 Compare August 31, 2026 14:56
snimu added 3 commits August 31, 2026 18:30
…ibility, subagents bar rename

Add classifyAgentStatus as the one status formula for every agent surface;
classifySessionRosterStatus (agents view) and the new
classifySubagentSnapshotStatus (subagents bar) are thin adapters over it,
so the two surfaces can no longer diverge on what running/idle/inactive mean.

Visibility fixes:
- Sessions of non-ready workers are no longer hidden from the agents view;
  the worker state (starting/recovering/stopping/failed) renders as the
  row's status label instead.
- A resident message-less subagent session is lifecycle "live" (it is a
  spawned worker, not a user draft); top-level drafts stay hidden.
- Subagent summary bar label renamed from "agents" to "subagents".

Part 1 of 3 for the event-driven daemon-owned agent roster.

ENG-5794
… changelog fragment

Addresses PR #1895 review: SessionRosterStatus was an alias with no
external importers, and the visibility comment restated the code.

ENG-5794
@snimu
snimu force-pushed the feat/agent-roster-classifier branch from 8dd6901 to d1ab404 Compare August 31, 2026 16:53
@xeophon
xeophon merged commit 4e42fab into main Sep 1, 2026
23 checks passed
@xeophon
xeophon deleted the feat/agent-roster-classifier branch September 1, 2026 07:18
olety pushed a commit to oneiron-dev/prime-agent that referenced this pull request Sep 1, 2026
…ibility, subagents bar rename (PrimeIntellect-ai#1895)

* feat(coding-agent): shared agent-status classifier, honest worker visibility, subagents bar rename

Add classifyAgentStatus as the one status formula for every agent surface;
classifySessionRosterStatus (agents view) and the new
classifySubagentSnapshotStatus (subagents bar) are thin adapters over it,
so the two surfaces can no longer diverge on what running/idle/inactive mean.

Visibility fixes:
- Sessions of non-ready workers are no longer hidden from the agents view;
  the worker state (starting/recovering/stopping/failed) renders as the
  row's status label instead.
- A resident message-less subagent session is lifecycle "live" (it is a
  spawned worker, not a user draft); top-level drafts stay hidden.
- Subagent summary bar label renamed from "agents" to "subagents".

Part 1 of 3 for the event-driven daemon-owned agent roster.

ENG-5794

* fix(coding-agent): drop the redundant roster-status alias and add the changelog fragment

Addresses PR PrimeIntellect-ai#1895 review: SessionRosterStatus was an alias with no
external importers, and the visibility comment restated the code.

ENG-5794

* refactor(coding-agent): derive subagents bar border fill from the label width

* test(coding-agent): fold the classifier pins into one compact contract test
PR9000 pushed a commit to PR9000/prime-agent that referenced this pull request Sep 1, 2026
…ibility, subagents bar rename (PrimeIntellect-ai#1895)

* feat(coding-agent): shared agent-status classifier, honest worker visibility, subagents bar rename

Add classifyAgentStatus as the one status formula for every agent surface;
classifySessionRosterStatus (agents view) and the new
classifySubagentSnapshotStatus (subagents bar) are thin adapters over it,
so the two surfaces can no longer diverge on what running/idle/inactive mean.

Visibility fixes:
- Sessions of non-ready workers are no longer hidden from the agents view;
  the worker state (starting/recovering/stopping/failed) renders as the
  row's status label instead.
- A resident message-less subagent session is lifecycle "live" (it is a
  spawned worker, not a user draft); top-level drafts stay hidden.
- Subagent summary bar label renamed from "agents" to "subagents".

Part 1 of 3 for the event-driven daemon-owned agent roster.

ENG-5794

* fix(coding-agent): drop the redundant roster-status alias and add the changelog fragment

Addresses PR PrimeIntellect-ai#1895 review: SessionRosterStatus was an alias with no
external importers, and the visibility comment restated the code.

ENG-5794

* refactor(coding-agent): derive subagents bar border fill from the label width

* test(coding-agent): fold the classifier pins into one compact contract test
ketema added a commit to ketema/prime-agent that referenced this pull request Sep 1, 2026
- Direct session transport between TUI and worker (ENG-5817, PrimeIntellect-ai#1926)
- Event-driven supervisor agent roster with push subscriptions (PrimeIntellect-ai#1897, PrimeIntellect-ai#1900, PrimeIntellect-ai#1895)
- Hardened daemon startup, recovery ownership, and worker launch diagnostics (PrimeIntellect-ai#1929, PrimeIntellect-ai#1918)
- Python REPL runtime single-dump snapshots and bash preview tool (PrimeIntellect-ai#1945, PrimeIntellect-ai#1911)
- Non-blocking RLM subagent deletion and snapshot update suppression (PrimeIntellect-ai#1954, PrimeIntellect-ai#1944)
- Saved catalog loading on Agents View open (PrimeIntellect-ai#1960)
- Advanced Anthropic prompt caching marker across tool results (PrimeIntellect-ai#1927)
- TUI process replacement on update and empty draft eviction (PrimeIntellect-ai#1631, PrimeIntellect-ai#1946, PrimeIntellect-ai#1920)
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.

3 participants