Skip to content

SessionStart hook averages ~12.5s on Windows (Git Bash) — measured over 36 session starts on v0.29.1 #660

Description

@blakeh8

Summary

On Windows (Git Bash hooks), session-start-hook.sh averages ~12.5 s per session start — measured across 36 real session starts over 14 days on v0.29.1. This is steady-state latency, not the intermittent consolidation block from #646: it's paid on essentially every start.

Measurements

Taken from Claude Code's own transcript hook records (durationMs on hook attachments), aggregated across all sessions in the window:

Hook n avg max
session-start-hook.sh (SessionStart) 36 12,491 ms 114,379 ms
user-prompt-hook.sh (UserPromptSubmit) 502 1,046 ms 7,107 ms

For contrast, other SessionStart hooks in the same sessions (plain bash scripts, similar size) average 0.5–1.3 s, so this isn't generic shell overhead — though Windows process-spawn cost is a plausible multiplier (each subprocess/jq invocation under Git Bash costs ~50–200 ms, so a hook that shells out dozens of times pays for it roughly 10× harder than on Unix).

Caveats stated honestly:

Environment

  • Plugin: remember v0.29.1 via the claude-plugins-official marketplace (pinned sha 1f5d3f9)
  • Claude Code 2.1.268, native install
  • Windows 11 (ARM64), hooks executed under Git Bash
  • Heavily used install (the plugin works well — this is purely about start latency)

Ask

Whatever the fix shape is — fewer subprocess invocations on the hot path, batching the jq reads, or pushing more of the start work into the backgrounded phase the #646 fix established — a Windows-representative timing budget for the foreground portion of session start would be the win. Happy to run instrumented builds or provide more granular timings from this machine if useful.


Measured and drafted with Claude Code session diagnostics; posted by the account owner.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cohort-11Open at the v0.32.0 tag, 2026-09-12. Frozen: nothing joins a cohort.cohort-12Open at the v0.33.0 tag, 2026-09-15 (6 issues). Frozen: nothing joins a cohort.cohort-13Open at the v0.34.0 tag, 2026-09-25. Frozen: nothing joins a cohort.cohort-14Open at the v0.35.0 tag, 2026-09-26. Frozen: nothing joins a cohort.cohort-15Open at the v0.35.1 tag, 2026-09-27. Frozen: nothing joins a cohort.lane-capturein-session hooks and the summarizer — post-tool, prompt, session-start/end, haiku.py, prompts/priority:mediumRecurring cost; compounds if unfixed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions