Repository navigation
chore: prime to always supervise subagents - #179
Merged
Merged
Conversation
maxy-shpfy
force-pushed
the
maxy/chore--prime-to-always-supervise-subagents
branch
from
November 12, 2026 05:55
c2752ab to
24e28b9
Compare
maxy-shpfy
changed the base branch from
maxy/feat--capture-agents-cost
to
main
November 12, 2026 05:55
maxy-shpfy
marked this pull request as ready for review
November 12, 2026 18:38
Co-authored-by: Cursor <cursoragent@cursor.com>
maxy-shpfy
force-pushed
the
maxy/chore--prime-to-always-supervise-subagents
branch
from
November 18, 2026 20:54
24e28b9 to
bf4bb4c
Compare
Mbeaulne
approved these changes
Nov 18, 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.
Description
Prime now supervises every sub-agent it spawns. On spawn, a
supervisereactor is installed on the sub-agent's Conversation so the orchestrator is woken on any termination cause surfaced there — budget exhausted, a failed Run, a dropped connection — which otherwise lands as a system notice no membership reaction fires on. On kill, the reactor is removed so a dead worker's thread stops showing in the workflow view.installSupervisor/removeSupervisorininternalAgents.ts, wired into/spawnand/kill. Both best-effort: a failure is logged, never surfaced as a failed spawn/kill. Install is idempotent (the store keys a reactor by its scope).subagentRecordhelper extracted for the persisted roster row.ReactorRegistrythreaded intocreateInternalAgentsRouter.internalAgents.test.tscovering install on spawn, firing on a cause, and removal on kill.Screenshots
N/A — backend only.
How to test
/internal/agents/spawn; confirm asupervisereactor is installed for the orchestrator, scoped to the sub-agent's Conversation.pnpm --filter @tangent/server exec tsx --test src/routes/internalAgents.test.ts.