SessionEnd
A Claude Code hook event, read out of the shipped bundle. No mined inventory carries it: everything below comes from what this site has written about it.
When a session terminates
Anthropic's own wording. Read off Hooks reference, captured 2026-10-22.
In the changelogs
19Releases whose published page names SessionEnd.
-
v2.1.301
SessionEnd hook timeout setting applies differently to organization hooks
If your organization defines SessionEnd hooks, CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS is read the organization's way, not straight from your setting
found in this entry's text, named in this entry
-
v2.1.293
Hooks that ran on another machine no longer print failures at session end
A failed SessionEnd hook that ran on another machine no longer writes its failure output locally, and a new message marks such hooks
found in this entry's text, named in this entry
-
v2.1.281
mcp_tool hooks wait for an MCP server that is still connecting
mcp_tool hooks now wait for an MCP server that is still connecting instead of being skipped straight away
found in this entry's text
-
v2.1.281
SessionEnd hooks skipped for spare (pre-warmed) processes
Spare Claude Code processes started in advance no longer run your SessionEnd hooks when they shut down
found in this entry's text, named in this entry
-
v2.1.271
Hook-exec keepalive for remote/CCR sessions
Remote and CCR sessions now hold a keepalive open while certain hooks are running
found in this entry's text
-
v2.1.271
Hook-dispatch keepalive hold, gated off by default
A new keepalive mechanism can keep remote hook connections open during slow hooks, off by default
found in this entry's text
-
v2.1.265
New hook-timing guard message for classic hooks calling turn.complete-style APIs
New warning explains why calling certain APIs from most hooks would freeze, and tells you to use turn.complete instead
found in this entry's text
-
v2.1.265
New
classic.*hook turn-block guidance distinguishes SessionStart/Setup/SessionEnd from other classic hooksClearer error guidance when a classic hook other than SessionStart/Setup/SessionEnd tries to block the turn
found in this entry's text
-
v2.1.246
Hooks are looked up through a per-session registry, not app state
Hooks are looked up per session rather than from global state; your hooks fire the same.
found in this entry's text
-
v2.1.246
Tool subprocesses can be launched inside a memory-capped cgroup
MCP servers, hooks, plugin installs and tmux sessions can run under a memory cap, dark-launched here.
found in this entry's text
-
v2.1.236
Hooks and Ctrl-C go quiet once shutdown has started
Once you quit, hooks stop firing except SessionEnd and Ctrl-C no longer aborts the request.
named in this entry, found in this entry's text
-
v2.1.236
Shutdown seals transcript writes and gives SessionEnd hooks more time
SessionEnd hooks get five seconds instead of 3.5, and the transcript is sealed at exit.
named in this entry, found in this entry's text
-
v2.1.234
SessionEnd hooks lose the
bypass_permissions_disabledreasonSessionEnd hooks no longer see a bypass_permissions_disabled reason, since nothing can end your session that way.
named in this entry, found in this entry's text
-
v2.1.229
Hooks are handed a session object instead of reading globals
Hooks now get an explicit session with id, working directory and project root instead of guessing from globals.
found in this entry's text
-
v2.1.228
Garbage numeric env vars fall back to defaults
Nonsense values in retry, MCP output and hook timeout env vars now fall back to defaults.
found in this entry's text
-
v2.1.116
UserPromptExpansion Hook Event
found in this entry's text
-
v2.1.101
Hook Event Validation
found in this entry's text
-
v2.0.36
Enhanced Session End Handling
found in this entry's text
-
v1.0.85
SessionEnd Hook Event
found in this entry's text
First cited
1The earliest release whose published evidence quoted SessionEnd was v2.1.301, 15 Oct 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table below.
Presence across releases
0The miner has never read a build containing this name. It is here because a changelog entry of ours names it, which is evidence that it existed and not evidence of which releases carried it. The inventory starts at v2.1.138 and everything older than that was never mined.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the hook event does. All hook events.