Skip to content

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

Description

@ron0507

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions