Skip to content

feat(subagents): List child agents from agent invocation state - #2109

Merged
dcramer merged 2 commits into
mainfrom
feat/list-child-agents
Oct 13, 2026
Merged

dcramer merged 2 commits into
mainfrom
feat/list-child-agents

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

A coordinating conversation could not see which child agents it started or what state they are in. It had only what the model remembered. This adds a read-only listAgents tool beside spawnAgent. It is the next slice of #2105 and the listing part of #881.

listAgents returns each direct child agent: conversation_id, optional name, status, latest task, error when blocked or failed, and updated_at. The data comes from SQL agent invocation records. The tool is registered only where spawnAgent is, so it stays behind experimental.subagents.

Two rules apply only to nested child agents (limits.maxAgentDepth > 0):

  • A child whose latest result is replaced shows pending, because its open child work starts another agent invocation on it.
  • An agent invocation that gives a grandchild result to a child is not shown as the child's task.

The nested child test moved to agent-invocation-nested.test.ts so agent-invocation-work.test.ts stays under the 1,000-line limit. It now also checks both rules through the tool.

stopAgent is the next follow-up on #881.

via David Cramer.

--

View Junior Session [Sentry]

Add a read-only listAgents tool beside spawnAgent. It reads each direct
child agent's status and latest task from SQL agent invocation records,
so a coordinating conversation sees real child state instead of what the
model remembers.

Move the nested child result scenario to its own test file so the work
suite stays under the file length limit.

Refs #2105, #881

Co-Authored-By: David Cramer <[email protected]>
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 13, 2026 9:37pm UTC

Request Review

Assert listAgents output directly in the nested test instead of in a
helper, use the repo's truncate name, and split the nested rules in the
agent-invocations README into a list.

Co-Authored-By: David Cramer <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

5 screenshot changes — 5 changed · 0 added · 0 removed

Review screenshots in Frameshift

Gallery Index · Desktop
Gallery Index · Desktop
Changed
Memories · Desktop
Memories · Desktop
Changed
Memories · Mobile
Memories · Mobile
Changed
Memories Library · Desktop
Memories Library · Desktop
Changed
Memories Library · Mobile
Memories Library · Mobile
Changed

@dcramer
dcramer merged commit f04b34f into main Oct 13, 2026
48 checks passed
@dcramer
dcramer deleted the feat/list-child-agents branch October 13, 2026 21:50

This branch was successfully deployed

1 active deployment
Preview – junior-docs — a3a20506 Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant