From e051b644e9e52ef5fdf7cfba2ac0effcc5b99715 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 22 Jul 2026 17:03:31 -0400 Subject: [PATCH] hooks: add explicit 10s timeout to SessionStart hooks The SessionStart hook blocks session start (async: false in the Claude Code config) but had no explicit timeout in hooks/hooks.json or hooks/hooks-cursor.json, so it silently relied on each platform's default (600s for Claude Code). If the hook ever hung, that's up to a 10-minute stall on every session start with no explanation. The hook just reads one file and does string escaping, so it should finish in milliseconds. Set an explicit 10s timeout on both configs so a hang fails fast instead of silently eating minutes. Refs #1560 --- hooks/hooks-cursor.json | 4 +++- hooks/hooks.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hooks/hooks-cursor.json b/hooks/hooks-cursor.json index 84e6d33874..82e2685fb9 100644 --- a/hooks/hooks-cursor.json +++ b/hooks/hooks-cursor.json @@ -3,8 +3,10 @@ "hooks": { "sessionStart": [ { - "command": "./hooks/run-hook.cmd session-start" + "command": "./hooks/run-hook.cmd session-start", + "timeout": 10 } ] } } + diff --git a/hooks/hooks.json b/hooks/hooks.json index 67975137aa..ba6823edc9 100644 --- a/hooks/hooks.json +++ b/hooks/hooks.json @@ -8,10 +8,12 @@ "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd\" session-start", "shell": "bash", - "async": false + "async": false, + "timeout": 10 } ] } ] } } +