Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Claude sessions survive slow SessionStart hooks #23202

Openjuliusmarmingewants to merge 10 commits intomain fromrefs/pull/23202/headopened View on GitHub

Showing 2 changed files with 5 additions and 2 deletions.

x
0 of 2 viewed, 2 left
3 additions and 1 deletionapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.tsModified
View file
@@ -350,7 +350,9 @@
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";
2 additions and 1 deletionapps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.tsModified
View file
@@ -500,7 +500,8 @@
​
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<void>();