Skip to content

fix(hooks): 15 s hook timeout so a slow node start on Windows keeps its output - #1165

Merged
DietrichGebert merged 1 commit into
mainfrom
fix/hook-timeout-15
Oct 18, 2026
Merged

DietrichGebert merged 1 commit into
mainfrom
fix/hook-timeout-15

Conversation

@DietrichGebert

Copy link
Copy Markdown
Owner

Fixes #1158

On Windows a cold node start (antivirus, startup contention) can take longer than the 5 s hook limit. Claude Code then drops the hook's output, so a /ponytail switch in that prompt is lost.

The three hooks in hooks/claude-codex-hooks.json (SessionStart, SubagentStart, UserPromptSubmit) now allow 15 s. They return in under 0.2 s normally, so nothing changes in the normal case. Cursor and Copilot keep 5 s for now.

…ts output

On Windows a cold node start (antivirus, startup contention) can pass the
5 s limit, and Claude Code then drops the hook's output, so a /ponytail
switch in that prompt is lost. The hooks return in under 0.2 s normally,
so the higher limit changes nothing in the normal case.

Fixes #1158
@DietrichGebert
DietrichGebert merged commit 5a5a605 into main Oct 18, 2026
1 check passed
@DietrichGebert
DietrichGebert deleted the fix/hook-timeout-15 branch October 18, 2026 00:47
DietrichGebert added a commit that referenced this pull request Oct 18, 2026
#1166)

Since #1082 the map child had 1 s, to keep a stalled map from costing the
rules inside the 5 s hook limit (#1079). On a contended Windows start the
map takes 1.5 to 2.3 s, so it was dropped every time. With the hook limit
at 15 s (#1165) the map can have 3 s and a stalled one still never costs
the rules. Cursor and Copilot run the same start hook, so their limits go
to 15 s as well.

Fixes #1157

Co-authored-by: Dietrich Gebert <dietrichgebert@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UserPromptSubmit hook "Tracking ponytail mode..." intermittently hits the 5 s timeout on Windows

1 participant