[DOCS] Hooks reference omits the SessionStart “fork” source
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/hooks
Section/Topic
The SessionStart matcher table and SessionStart input schema.
Current Documentation
The SessionStart section currently lists these matcher values:
startup — New session resume — --resume, --continue, or /resume clear — /clear compact — Auto or manual compaction
It describes the source field as:
How the session started: “startup” for new sessions, “resume” for resumed sessions, “clear” after /clear, or “compact” after compaction
What's Wrong or Missing?
Claude Code 2.1.214 changes forked sessions so SessionStart hooks report source “fork” rather than “resume”. The matcher table and input schema enumerate the older values and do not explain how a hook should distinguish a fork from a normal resume.
A hook that refreshes context, sets environment variables, or applies different initialization for resumed sessions can now misclassify a forked session and perform the wrong work.
Suggested Improvement
Add fork to both the matcher-value table and the source field description. Explain that it is emitted when a session begins as a fork, and include a JSON input example such as:
~~~json
{
"hook_event_name": "SessionStart",
"source": "fork"
}
~~~
Add a short guidance note explaining when to treat fork like startup, resume, or a separate initialization path, and add a 2.1.214 minimum-version marker.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/hooks | SessionStart matcher values and input schema |
| https://code.claude.com/docs/en/hooks-guide | Hook setup and lifecycle cross-reference |
Release: Claude Code 2.1.214.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗