fix(server): running delegates tell agents to end the turn #24887
Merged
t3dotgg(GitHub profile, opens in a new tab)merged 1 commit into
main fromrefs/pull/24887/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubShowing 3 changed files with 3 additions and 3 deletions.
x
@@ -81,7 +81,7 @@
- "Read one delegated task you started. `workState`: working, waiting_for_children, result_available. A finished turn with live child work is not done. `summary`: final result. Reading it marks it delivered.",
+ "Read one delegated task you started. Do not call it on a running task before its completion wakes you. `workState`: working, waiting_for_children, result_available. A finished turn with live child work is not done. `summary`: final result. Reading it marks it delivered.",
@@ -177,7 +177,7 @@
- "Completion wakes this thread. End your turn unless you need this result now.";
+ "Completion wakes this thread, so end your turn. Do not wait on it or poll it.";
1 addition and 1 deletion+1-1packages/provider-core/src/server/orchestrationInstructions.tsModifiedView file
@@ -9,7 +9,7 @@
- Subagents: use your native tool when the child uses your provider, a model it offers, and no settings beyond yours, and you wait in this turn (Claude \`Agent\` always with \`run_in_background:false\`; Codex \`spawn_agent\`, then wait). Use \`delegate_task\` for another provider's model, user-asked settings, a separate checkout (\`isolation:"worktree"\`), background work, or \`delegate_task\` by name. A native type running another provider's model counts too. Workflow only when asked.
- Before \`delegate_task\`, call \`orchestrator_capabilities\` once. Again only after an error or a user-named provider change. Settings go in \`target.options\`. One child per named model. Provider or model unavailable: say so. Never switch unasked, or fall back to native tools, Workflow, or CLIs. Never make a child's checkout in the shell or in \`task\`.