diff --git a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts index 64537c7e5fa8f..4e7fe41052834 100644 --- a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts +++ b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts @@ -350,7 +350,9 @@ export const CLAUDE_DEFAULT_INSTANCE_ID = defaultInstanceIdForDriver(CLAUDE_PROV const CLAUDE_SCRIPT_EXTENSIONS = [".js", ".mjs", ".tsx", ".ts", ".jsx"]; // The SDK has no control-request deadline; the CLI waits up to 30 s per MCP server. const CLAUDE_MCP_REGISTRATION_TIMEOUT = "90 seconds"; -const CLAUDE_BOOT_TIMEOUT = "5 minutes"; +// Boot includes SessionStart hooks, which Claude Code runs to its 10 minute hook +// timeout before it answers initialize. +const CLAUDE_BOOT_TIMEOUT = "11 minutes"; // Claude can consume a subagent result before the launching turn ends, leaving // its notification with no native wake turn to answer the continuation. const CLAUDE_WAKE_TURN_START_DEADLINE = "2 minutes"; diff --git a/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts b/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts index 3aca32bf41f90..2b891015e0e6f 100644 --- a/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts +++ b/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts @@ -500,7 +500,8 @@ it.effect("does not reuse a fresh session ID after MCP registration times out", it.effect.each([ ["opens after a slow CLI boot", "120 seconds", true], - ["times out a CLI that never boots", "5 minutes", false], + ["opens after SessionStart hooks run near their 10 minute timeout", "10 minutes", true], + ["times out a CLI that never boots", "11 minutes", false], ] as const)("%s", ([, bootWait, boots]) => Effect.gen(function* () { const waiting = Promise.withResolvers();