Skip to content

Commit 3eaae44

Browse files
SunkenInTimeclaude
andauthored
fix(server): long T3 tool calls from Claude no longer time out at 60 seconds (pingdotgg#14835)
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 66a9107 commit 3eaae44

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ describe("ClaudeAdapterV2 MCP query overrides", () => {
469469
headers: {
470470
Authorization: "Bearer secret-claude-token",
471471
},
472+
timeout: ClaudeAdapterV2.CLAUDE_T3_MCP_TOOL_TIMEOUT_MS,
472473
},
473474
} as const;
474475

@@ -686,6 +687,7 @@ describe("ClaudeAdapterV2 native protocol logging", () => {
686687
headers: {
687688
Authorization: "Bearer secret-claude-token",
688689
},
690+
timeout: ClaudeAdapterV2.CLAUDE_T3_MCP_TOOL_TIMEOUT_MS,
689691
},
690692
},
691693
});

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,13 @@ export const CLAUDE_READ_ONLY_T3_MCP_ALLOWED_TOOLS: ReadonlyArray<string> = [
904904
"mcp__t3-code__t3_queue_read",
905905
];
906906

907+
// Claude Code aborts an HTTP MCP call after 60 s ("The operation timed out.")
908+
// unless the server config sets `timeout`. T3's wait tools (t3_thread_wait,
909+
// delegate_task mode=wait) legitimately block for up to an hour
910+
// (MAX_WAIT_TIMEOUT_MS in OrchestratorMcpService), so the budget sits just
911+
// above that and the server's own wait timeout is what ends a long call.
912+
export const CLAUDE_T3_MCP_TOOL_TIMEOUT_MS = 65 * 60 * 1_000;
913+
907914
// The SDK's `allowedTools` only pre-approves tool calls; availability is the
908915
// separate `tools` option. Attaching the t3-code MCP server therefore always
909916
// pre-approves its tools (headless modes like `dontAsk` deny anything that is
@@ -934,6 +941,7 @@ export function claudeMcpQueryOverrides(input: {
934941
headers: {
935942
Authorization: session.authorizationHeader,
936943
},
944+
timeout: CLAUDE_T3_MCP_TOOL_TIMEOUT_MS,
937945
},
938946
},
939947
};

0 commit comments

Comments
 (0)