From 8f26613eb0cd10bb4a29b8f71a1a1c628e789047 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2026 03:13:40 +0000 Subject: [PATCH 1/3] fix(subagents): Tell a child that a missing-input reply is not a result Co-Authored-By: David Cramer --- packages/junior/src/chat/tools/runtime/report-blocked.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/junior/src/chat/tools/runtime/report-blocked.ts b/packages/junior/src/chat/tools/runtime/report-blocked.ts index ebca873fd9..98eb5075c1 100644 --- a/packages/junior/src/chat/tools/runtime/report-blocked.ts +++ b/packages/junior/src/chat/tools/runtime/report-blocked.ts @@ -12,7 +12,7 @@ export function createReportBlockedTool() { readOnlyHint: false, }, description: - "End this delegated task as blocked. Call this when missing access, credentials, input, or a decision stops the task, also when a search for the missing part found nothing. Do not guess, mock, or fake results to work around it.", + "End this delegated task as blocked. Call this instead of a final text reply when you cannot give the result that the task asks for because access, credentials, input, or a decision is missing, also when a search for the missing part found nothing. A reply that only says what is missing is not a result. Do not guess, mock, or fake results to work around it.", inputSchema: z .object({ missing: z From 004013c55921c688a91426a8712f787800b75e4f Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2026 03:28:34 +0000 Subject: [PATCH 2/3] fix(subagents): Say that a child cannot reply with text when it has no result --- packages/junior/src/chat/prompt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/junior/src/chat/prompt.ts b/packages/junior/src/chat/prompt.ts index 40008b73e7..45ad67aac4 100644 --- a/packages/junior/src/chat/prompt.ts +++ b/packages/junior/src/chat/prompt.ts @@ -363,7 +363,7 @@ const AUTOMATION_RUN_RULES = [ const CHILD_AGENT_RUN_RULES = [ "- A parent agent started you. Your input is a task or message from the parent, a result or message from one of your own child agents, or an event from one of your own watches. That input is the job. The parent agent reads your final reply; no person reads this run.", "- Do the work now. Do not ask questions, ask for approval, or offer options.", - `- Your final text reply goes to the parent as finished work. When the task cannot be finished, end the run with \`${REPORT_BLOCKED_TOOL_NAME}\` instead.`, + `- Your final text reply goes to the parent as the result of the task. When you cannot give that result, do not reply with text. End the run with \`${REPORT_BLOCKED_TOOL_NAME}\` instead.`, "- A tool result with `timed_out: true` means that attempt did not finish. Before you retry work that may have side effects, inspect authoritative state and do not repeat a mutation that already applied.", ]; From f47acd3f5f90e1576acd74bd1f5f9cf980da58ef Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2026 03:38:52 +0000 Subject: [PATCH 3/3] Revert "fix(subagents): Say that a child cannot reply with text when it has no result" This reverts commit 004013c55921c688a91426a8712f787800b75e4f. --- packages/junior/src/chat/prompt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/junior/src/chat/prompt.ts b/packages/junior/src/chat/prompt.ts index 45ad67aac4..40008b73e7 100644 --- a/packages/junior/src/chat/prompt.ts +++ b/packages/junior/src/chat/prompt.ts @@ -363,7 +363,7 @@ const AUTOMATION_RUN_RULES = [ const CHILD_AGENT_RUN_RULES = [ "- A parent agent started you. Your input is a task or message from the parent, a result or message from one of your own child agents, or an event from one of your own watches. That input is the job. The parent agent reads your final reply; no person reads this run.", "- Do the work now. Do not ask questions, ask for approval, or offer options.", - `- Your final text reply goes to the parent as the result of the task. When you cannot give that result, do not reply with text. End the run with \`${REPORT_BLOCKED_TOOL_NAME}\` instead.`, + `- Your final text reply goes to the parent as finished work. When the task cannot be finished, end the run with \`${REPORT_BLOCKED_TOOL_NAME}\` instead.`, "- A tool result with `timed_out: true` means that attempt did not finish. Before you retry work that may have side effects, inspect authoritative state and do not repeat a mutation that already applied.", ];