{"name":"SessionEnd","slug":"sessionend","family":"hook","title":"Hook events","noun":"hook event","description":"When a session terminates","description_source":"docs","described_by":{"doc":"claude-code\/hooks","title":"Hooks reference"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.308","builds":0,"mined_builds":149,"first_cited":{"version":"2.1.301","released_at":"2026-10-15 14:34:23","spans":1}},"aliases":[],"entries":[{"version":"2.1.301","anchor":"sessionend-hook-timeout-resolves-differently-when-an-organiz","heading":"SessionEnd hook timeout setting applies differently to organization hooks","line":"If your organization defines SessionEnd hooks, CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS is read the organization's way, not straight from your setting","released_at":"2026-10-15 14:34:23","reason":"found in this entry's text, named in this entry"},{"version":"2.1.293","anchor":"hook-runs-on-another-machine-now-reported","heading":"Hooks that ran on another machine no longer print failures at session end","line":"A failed SessionEnd hook that ran on another machine no longer writes its failure output locally, and a new message marks such hooks","released_at":"2026-10-07 17:18:04","reason":"found in this entry's text, named in this entry"},{"version":"2.1.281","anchor":"mcp-tool-hooks-wait-for-an-mcp-server-that-is-still-connecti","heading":"mcp_tool hooks wait for an MCP server that is still connecting","line":"mcp_tool hooks now wait for an MCP server that is still connecting instead of being skipped straight away","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text"},{"version":"2.1.281","anchor":"sessionend-hooks-skipped-for-spare-pre-warmed-processes","heading":"SessionEnd hooks skipped for spare (pre-warmed) processes","line":"Spare Claude Code processes started in advance no longer run your SessionEnd hooks when they shut down","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text, named in this entry"},{"version":"2.1.271","anchor":"hook-exec-keepalive-for-remoteccr-sessions","heading":"Hook-exec keepalive for remote\/CCR sessions","line":"Remote and CCR sessions now hold a keepalive open while certain hooks are running","released_at":"2026-09-14 19:45:19","reason":"found in this entry's text"},{"version":"2.1.271","anchor":"hook-dispatch-keepalive-hold-gated-off-by-default","heading":"Hook-dispatch keepalive hold, gated off by default","line":"A new keepalive mechanism can keep remote hook connections open during slow hooks, off by default","released_at":"2026-09-14 19:45:19","reason":"found in this entry's text"},{"version":"2.1.265","anchor":"new-hook-timing-guard-message-for-classic-hooks-calling-turn","heading":"New hook-timing guard message for classic hooks calling turn.complete-style APIs","line":"New warning explains why calling certain APIs from most hooks would freeze, and tells you to use turn.complete instead","released_at":"2026-09-08 19:05:16","reason":"found in this entry's text"},{"version":"2.1.265","anchor":"new-classic-hook-turn-block-guidance-distinguishes-sessi","heading":"New classic.* hook turn-block guidance distinguishes SessionStart\/Setup\/SessionEnd from other classic hooks","line":"Clearer error guidance when a classic hook other than SessionStart\/Setup\/SessionEnd tries to block the turn","released_at":"2026-09-08 19:05:16","reason":"found in this entry's text"},{"version":"2.1.246","anchor":"hooks-are-looked-up-through-a-per-session-registry-not-app-s","heading":"Hooks are looked up through a per-session registry, not app state","line":"Hooks are looked up per session rather than from global state; your hooks fire the same.","released_at":"2026-08-25 19:17:34","reason":"found in this entry's text"},{"version":"2.1.246","anchor":"tool-subprocesses-can-be-launched-inside-a-memory-capped-cgr","heading":"Tool subprocesses can be launched inside a memory-capped cgroup","line":"MCP servers, hooks, plugin installs and tmux sessions can run under a memory cap, dark-launched here.","released_at":"2026-08-25 19:17:34","reason":"found in this entry's text"}],"entries_total":19,"docs":[{"source":"claude-code","path":"hooks","title":"Hooks reference","documented":true},{"source":"claude-code","path":"agent-sdk\/hooks","title":"Intercept and control agent behavior with hooks","documented":true},{"source":"api","path":"api\/beta\/sessions\/events","title":"Events","documented":false},{"source":"api","path":"api\/beta\/sessions\/events\/list","title":"List Events","documented":false},{"source":"api","path":"api\/beta\/sessions\/events\/stream","title":"Stream Events","documented":false},{"source":"api","path":"api\/beta\/sessions\/threads","title":"Threads","documented":false},{"source":"api","path":"api\/beta\/sessions\/threads\/events","title":"Events","documented":false},{"source":"api","path":"api\/beta\/sessions\/threads\/events\/list","title":"List Session Thread Events","documented":false},{"source":"api","path":"api\/beta\/sessions\/threads\/events\/stream","title":"Stream Session Thread Events","documented":false},{"source":"api","path":"managed-agents\/events-and-streaming","title":"events-and-streaming","documented":false}],"docs_total":14,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/hook\/sessionend","family_url":"https:\/\/changelogs.core-directive.com\/reference\/hook.json"}