Skip to content

Don't cascade-archive child agents launched via dispatch_launch_agent#712

Merged
selfcontained merged 2 commits into
mainfrom
agt_715a6d1d34ce/agent-1d34ce
Jun 30, 2026
Merged

Don't cascade-archive child agents launched via dispatch_launch_agent#712
selfcontained merged 2 commits into
mainfrom
agt_715a6d1d34ce/agent-1d34ce

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Archiving a parent agent was cascading the archive to all child agents, including regular agents launched via dispatch_launch_agent. Only review/persona agents should be cascade-archived.
  • Added getReviewChildAgentIds() in persona-reviews.ts that joins persona_reviews with agents to definitively identify review children — more robust than checking persona IS NOT NULL on the agents table.
  • Both executeArchive() and deleteAgentDirect() now use this shared query, so only agents with a persona_reviews row are cascade-archived.

Test plan

  • Type check passes
  • Unit tests pass (39 archive tests, including new "does not cascade to non-review child agents" test)
  • E2E tests pass (171 tests)

🤖 Generated with Claude Code

selfcontained and others added 2 commits June 30, 2026 11:42
Only review/persona agents (those with a persona_reviews row) should be
archived when their parent is archived. Regular agents launched via
dispatch_launch_agent now survive independently.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Adds AND a.parent_agent_id = $1 and SELECT DISTINCT to the review
child lookup, preventing stale persona_reviews rows from broadening
the deletion surface.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@selfcontained
selfcontained merged commit ddc3a94 into main Jun 30, 2026
1 check passed
@selfcontained
selfcontained deleted the agt_715a6d1d34ce/agent-1d34ce branch June 30, 2026 17:58
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.

1 participant