SessionStart hooks have no explicit timeout — a stall blocks session start for 10+ minutes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 287
- Forks
- 58
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 17
Description
Summary
hooks/hooks.json registers three SessionStart commands with no timeout field, so each inherits Claude Code's 600-second default. When one of them stalls, session start blocks for the full ten minutes before the timeout fires.
Evidence
Three hook_cancelled transcript entries, all with timedOut: true:
{"hookName": "SessionStart:resume", "hookEvent": "SessionStart",
"durationMs": 961095, "timedOut": true, "timeoutMs": 600000}
961 s elapsed against a 600 s timeout, on session resume.
Environment
- Plugin
vercel@claude-plugins-officialv0.45.1 - Claude Code 2.1.220 (native install), macOS
- Node v18.20.8; hooks resolve
nodefrom/opt/homebrew/bin/node
Notes
Intermittent — the hooks normally complete quickly (~/.config/vercel-plugin/dau-stamp and active-session.json are written on most sessions). I could not identify the stalling script from reading the source. Two plausible suspects are ruled out: sendTelemetry in telemetry.mjs already bounds its fetch with a 3 s AbortController, and the readdirSync calls in session-start-profiler.mjs are single-level rather than recursive.
One environmental note that may or may not be relevant: the project root in my case is the home directory, so session-start-profiler.mjs runs readdirSync against $HOME.
Suggested fix
Set an explicit short timeout on each SessionStart hook in hooks.json — 10–15 s seems ample given normal completion time. A session-start hook inheriting the 600 s default means any stall is a ten-minute block. I've patched this locally, but a plugin update will overwrite it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open hooks/hooks.json and inspect the three SessionStart command registrations; the issue identifies the missing timeout fields and suggests a 10–15 second limit. Add an explicit timeout to each hook, then verify that all three registrations have the intended bound and do not inherit the 600-second default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100