Skip to content

Commit b9381c2

Browse files
zingiAaron Zingerleclaudejuliusmarminge
authored
fix(server): Claude Plan mode runs t3_background_wait without asking (pingdotgg#34343)
Co-authored-by: Aaron Zingerle <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
1 parent 4a075c9 commit b9381c2

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎apps/server/src/mcp/toolkits/orchestrator/tools.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ const BackgroundWaitTool = Tool.make("t3_background_wait", {
154154
failure: OrchestratorMcpFailure,
155155
failureMode: "return",
156156
dependencies,
157-
}).annotate(Tool.Title, "Wait on background work");
157+
})
158+
.annotate(Tool.Title, "Wait on background work")
159+
// Only marks which tasks keep the thread Working; Claude Plan mode blocks tools without this.
160+
.annotate(Tool.Readonly, true)
161+
.annotate(Tool.Destructive, false);
158162

159163
const ScheduleTaskTool = Tool.make("schedule_task", {
160164
description:

‎apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,8 @@ describe("ClaudeAdapterV2 MCP query overrides", () => {
611611
.map((tool) => `mcp__t3-code__${tool.name}`)
612612
.sort();
613613

614+
// regression: #32022 Claude Plan mode asks before every non-read-only MCP call
615+
assert.include(readOnlyToolNames, "mcp__t3-code__t3_background_wait");
614616
assert.deepEqual(
615617
[...ClaudeAdapterV2.CLAUDE_READ_ONLY_T3_MCP_ALLOWED_TOOLS].sort(),
616618
readOnlyToolNames,

‎apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,6 +2023,7 @@ export const CLAUDE_T3_MCP_TOOL_WILDCARD = "mcp__t3-code__*";
20232023
export const CLAUDE_READ_ONLY_T3_MCP_ALLOWED_TOOLS: ReadonlyArray<string> = [
20242024
"mcp__t3-code__orchestrator_capabilities",
20252025
"mcp__t3-code__list_scheduled_tasks",
2026+
"mcp__t3-code__t3_background_wait",
20262027
"mcp__t3-code__t3_thread_list",
20272028
"mcp__t3-code__t3_thread_wait",
20282029
"mcp__t3-code__t3_worktree_status",

0 commit comments

Comments
 (0)