Repository navigation
feat(subagents): Let a child agent report that it is blocked - #2133
Merged
Merged
Conversation
A child agent's reply goes to its parent agent, so a child that is missing access or input either asked a question nobody would answer or guessed. Each child run now has reportBlocked. It ends the run, and the agent invocation ends as blocked with what is missing, so the parent gets an agent_invocation.blocked result instead of a completed one. Refs #2105 Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
A worker that died after the child Turn completed but before it saved the agent invocation recovered the Turn as completed with an empty result. Read the blocked report from the recovered Turn's messages too.
Co-Authored-By: David Cramer <[email protected]>
dcramer
approved these changes
Oct 14, 2026
The integration evals recorded these model responses in https://github.com/getsentry/junior/actions/runs/38521847762. The evals of this commit replay them in strict mode. Eval-Suite: integration
Sentry Evalsjunior-behavioral
Base commit junior-guardian
Base commit junior-integration
Base commit junior-router
Base commit |
The verification code task read like a request for a secret, so the parent never started the child agent.
…ed work In the eval, the child searched for the missing deploy region, found nothing, and replied with text. That ended its agent invocation as completed instead of blocked.
The integration evals recorded these model responses in https://github.com/getsentry/junior/actions/runs/38524841458. The evals of this commit replay them in strict mode. Eval-Suite: integration
A child run got the conversation rules, which tell the agent to ask the user one question and to say what it checked. In the eval, the child replied "I don't have the chosen deploy region" as text, so its agent invocation ended as completed. The child_agent mode replaces those rules and says that the final text is finished work and that a blocked task ends with reportBlocked.
The integration evals recorded these model responses in https://github.com/getsentry/junior/actions/runs/38525864514. The evals of this commit replay them in strict mode. Eval-Suite: integration
The behavioral evals recorded these model responses in https://github.com/getsentry/junior/actions/runs/38525864516. The evals of this commit replay them in strict mode. Eval-Suite: behavioral
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b177faa. Configure here.
The child_agent mode still used the conversation failure and output rules, which ask for a final reply that explains a blocker. That reply ends the agent invocation as completed. Child runs now put a stopping failure in reportBlocked and reply with text only when the task is finished.
The integration evals recorded these model responses in https://github.com/getsentry/junior/actions/runs/38528876063. The evals of this commit replay them in strict mode. Eval-Suite: integration
The behavioral evals recorded these model responses in https://github.com/getsentry/junior/actions/runs/38528876032. The evals of this commit replay them in strict mode. Eval-Suite: behavioral
…s missing The user asks the parent to tell what happened, so the parent does not have to ask for the region. The run before this one passed the child report and failed only on that rubric line.
The integration evals recorded these model responses in https://github.com/getsentry/junior/actions/runs/38529759750. The evals of this commit replay them in strict mode. Eval-Suite: integration
The behavioral evals recorded these model responses in https://github.com/getsentry/junior/actions/runs/38529759768. The evals of this commit replay them in strict mode. Eval-Suite: behavioral
11 of 35 tasks
4 tasks
This branch was successfully deployed
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.

A child agent's reply goes to its parent agent, not to a person. When a child was missing access, input, or a decision, it could only ask a question that nobody answers, or guess. In both cases its agent invocation ended as
completed, so the parent read the reply as finished work.Each child run now has
reportBlocked, a tool with one requiredmissingfield. It is exclusive, and it ends the run the same wayfinishAutomationRunends an Automation run. The turn result carries the report, and the agent invocation ends asblockedwithmissingas its reason. The parent then gets anagent_invocation.blockedresult that shows aMissing:section. The next step tells the parent to send the missing input back withspawnAgentand the same name, or to tell the user what is missing.The report is read only from the new messages of the run. A named child keeps its history, so an old report must not end a later agent invocation.
This is the "child reports back" item in the Steering workstream of #2105.
needs_inputas its own status is not in this change. A named child that is blocked and then gets the missing input throughspawnAgentcovers that case for now.via David Cramer.
--
View Junior Session [Sentry]