Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a steered send no longer leaves a subagent task running #19019

MergedScottN-PV(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/19019/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 149 additions and 2 deletions.

x
0 of 3 viewed, 3 left
1 addition and 1 deletionapps/server/src/mcp/toolkits/orchestrator/tools.tsModified
View file
@@ -235,7 +235,7 @@
​
const ThreadSendTool = Tool.make("t3_thread_send", {
description:
- "Send a message to any T3 thread in this environment. The target cannot have broader permission modes than the caller. Use delegate_task with the full review context and a new clientRequestId for independent review rounds. For a follow-up that needs the same child's conversation, send to its childThreadId. After the original task completes, a requested follow-up creates a fresh task in that child thread and returns taskId; its completion notifies the parent, and the original result stays unchanged. mode='auto' starts an idle thread, steers a fully active turn, or queues behind a turn that is not yet steerable. Use queue for a separate follow-up turn, steer for an in-flight update, or restart to interrupt-and-restart the active turn. clientRequestId makes retries idempotent.",
+ "Send a message to any T3 thread in this environment. The target cannot have broader permission modes than the caller. Use delegate_task with the full review context and a new clientRequestId for independent review rounds. For a follow-up that needs the same child's conversation, send to its childThreadId. After the original task completes, a requested follow-up creates a fresh task in that child thread and returns taskId when it starts a turn or restarts a turn without its own task; its completion notifies the parent, and the original result stays unchanged. A steer that joins a running turn returns that turn's task, if it has one. mode='auto' starts an idle thread, steers a fully active turn, or queues behind a turn that is not yet steerable. Use queue for a separate follow-up turn, steer for an in-flight update, or restart to interrupt-and-restart the active turn. clientRequestId makes retries idempotent.",
parameters: OrchestratorMcpThreadSendInput,
success: OrchestratorMcpThreadSendResult,
failure: OrchestratorMcpFailure,
139 additions and 1 deletionapps/server/src/mcp/OrchestratorMcpToolkit.integration.test.tsModified
View file
@@ -190,6 +190,9 @@
turn: ProviderAdapter.ProviderAdapterV2TurnInput,
) => Deferred.Deferred<void> | undefined;
readonly response: (turn: ProviderAdapter.ProviderAdapterV2TurnInput) => string;
+ readonly steerReceived?: (
+ steer: ProviderAdapter.ProviderAdapterV2SteerInput,
+ ) => Deferred.Deferred<void> | undefined;
}): ProviderAdapter.ProviderAdapterV2["Service"] {
return {
instanceId: input.instanceId,
@@ -357,7 +360,12 @@
]);
}),
- steerTurn: () => Effect.void,
+ steerTurn: (steer) => {