What
SessionEnd hooks are commands that run automatically when a session ends. CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS is an environment variable that sets how long they may run. Claude Code now checks who defined those hooks before using it:
- If any are organization or managed hooks, the timeout is read the way organization hooks read it.
- If all are your own, your value is used directly, as before.
- If Claude Code cannot tell who defined them, it logs an error and reads the timeout the organization's way.
Why
A value you set yourself can no longer shorten or lengthen the time allowed for SessionEnd hooks your organization defines.
Names in the bundleCLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MSSessionEnd
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up SessionEnd, on Hooks reference.
![Hook lifecycle diagram showing optional Setup feeding into SessionStart, then a per-turn loop containing UserPromptSubmit, UserPromptExpansion for slash commands, the nested agentic loop (PreToolUse, PermissionRequest, PostToolUse, PostT…hooks see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up SessionEnd, on Hooks reference.