Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.333 ·

Shutdown now takes SessionEnd hooks into account when waiting

On exit, Claude Code now checks for a SessionEnd hook in settings and adjusts how it waits, and waits for one more step before removing a worktree

Under the hood Internal Changes
JSON All of v2.1.333
Under the hoodTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
HooksArea: what it touches
Internal ChangesKind: in v2.1.333,
Internal ChangesSection of the release

Unclear Whether exit becomes faster or slower when a SessionEnd hook is set is not clear.

What

A SessionEnd hook is a command you can set to run when a session ends. When Claude Code shuts down, it now checks whether one is set in your settings and uses that to decide how its cleanup handles messages still being sent.

It also now waits for one extra step to finish before removing a worktree (a separate working copy of your project that Claude Code may create).

Why

This can change how long Claude Code takes to exit.

Read from
Names in the bundleSessionEnd
Since it was published

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. | `timeout` | no | Seconds before canceling. Claude Code doesn't enforce it on a command hook you run with [`async: true`](#run-hooks-in-the-background). Defaults: 600 for `command`, `http`, and `mcp_tool`; 30 for `prompt`; 60 for `agent`.… hooks see the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhether exit becomes faster or slower when a `SessionEnd` hook is set is not clear.
Anthropic's documentation agreesAnthropic's documentation has since written up SessionEnd, on Hooks reference.
Anthropic's release notes agreeSelf-hosted runner: Changed a SessionEnd hook that passes its time limit on some Linux hosts to also end background programs it started…

See this entry in the whole of v2.1.333 →

Feedback