SessionStart hooks have no explicit timeout — a stall blocks session start for 10+ minutes

Open Beginner friendly
#129 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
javascript, node.js
Domain
tooling

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.

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-official v0.45.1
  • Claude Code 2.1.220 (native install), macOS
  • Node v18.20.8; hooks resolve node from /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.

Dominant language
TypeScript
Stars
287
Forks
58
Avg merge
1d 24m
Merged PRs (30d)
18

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vercel/vercel-plugin

All issues in vercel/vercel-plugin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.