Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(claude): reject waits on native subagent commands #25015

ClosedZheruel(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/25015/headopened View on GitHub

Showing 3 changed files with 150 additions and 5 deletions (loading 1).

x
0 of 3 viewed, 3 left
1 addition and 1 deletionapps/server/src/mcp/toolkits/orchestrator/tools.tsModified
View file
@@ -119,7 +119,7 @@
​
const BackgroundWaitTool = Tool.make("t3_background_wait", {
description:
- "Keep this thread in Working while background work runs. Pass its task ID after starting it. Not for work left running (dev server, watcher). `waiting=false` clears. Does not stop the task. Claude only.",
+ "Keep this thread in Working while session-owned background work runs. Pass its task ID after starting it. Native subagents' tasks return unmatched: wait for their commands to finish before returning. This does not keep tasks alive or arrange a wake-up. Not for work left running (dev server, watcher). `waiting=false` clears. Does not stop the task. Claude only.",
parameters: Schema.Struct({
taskIds: Schema.Array(TrimmedNonEmptyString).check(
Schema.isMinLength(1),
149 additions and 4 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -7398,7 +7398,7 @@
- it.effect("holds only the background tasks the agent marks awaited, until they end", () =>
+ it.effect("marks only session-owned background tasks awaited, until they end", () =>
Effect.scoped(
Effect.gen(function* () {
const harness = yield* makeWakeHarness;
@@ -7415,6 +7415,7 @@
task_id: taskId,
task_type: "local_bash",
description: taskId,
+ ...(taskId === "subagent-tests" ? { parent_task_id: "foreground-agent" } : {}),
uuid,