Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mcp): agents call t3_background_wait with taskIds on the first try #47243

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

Showing 10 changed files with 24 additions and 11 deletions (loading 7).

x
0 of 10 viewed, 10 left
5 additions and 3 deletionsapps/server/src/mcp/toolkits/orchestrator/handlers.tsModified
View file
@@ -78,9 +78,11 @@
(cause) =>
new OrchestratorMcpFailure({
code:
- cause.reason === "unsupported" || cause.reason === "unmatched"
- ? "invalid_request"
- : "orchestration_error",
+ cause.reason === "unmatched"
+ ? "task_not_found"
+ : cause.reason === "unsupported"
+ ? "invalid_request"
+ : "orchestration_error",
message: cause.message,
}),
),
4 additions and 2 deletionsapps/server/src/mcp/toolkits/orchestrator/tools.tsModified
View file
@@ -148,7 +148,7 @@
​
const BackgroundWaitTool = Tool.make("t3_background_wait", {
description:
- "Keep this thread in Working while background work runs. Pass its task ID once started. Not for work left running (dev server, watcher). `waiting=false` clears. Doesn't stop tasks.",
+ "Keep thread Working for a background shell/Monitor: pass `taskIds` once started (not subagents, delegates, dev servers). `waiting=false` clears.",
parameters: Schema.Struct({
taskIds: Schema.Array(TrimmedNonEmptyString).check(
Schema.isMinLength(1),
@@ -168,6 +168,8 @@