Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): running delegates tell agents to end the turn #24887

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/24887/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 3 changed files with 3 additions and 3 deletions.

x
0 of 3 viewed, 3 left
1 addition and 1 deletionapps/server/src/mcp/toolkits/orchestrator/tools.tsModified
View file
@@ -81,7 +81,7 @@
​
const TaskStatusTool = Tool.make("task_status", {
description:
- "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.",
parameters: OrchestratorMcpTaskStatusInput,
success: OrchestratorMcpDelegateTaskResult,
failure: OrchestratorMcpFailure,
1 addition and 1 deletionpackages/contracts/src/orchestratorMcp.tsModified
View file
@@ -177,7 +177,7 @@
​
// Set only on results for still-running tasks whose completion will wake the parent.
export const ORCHESTRATOR_MCP_RUNNING_TASK_NEXT =
- "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.";
const OrchestratorMcpRunningTaskNext = Schema.Literal(ORCHESTRATOR_MCP_RUNNING_TASK_NEXT);
​
export const OrchestratorMcpDelegateTaskResult = Schema.Struct({
1 addition and 1 deletionpackages/provider-core/src/server/orchestrationInstructions.tsModified
View 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\`.
- Every new delegate review or re-check is a new \`delegate_task\` (brief, findings, objections), never a \`t3_thread_send\`. Fix small review findings yourself; start no delegate for them. When told to proceed without a delegate, \`task_cancel\` it. Start no replacement.