Under the hoodTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
HooksArea: what it touches
Internal ChangesKind: in v2.1.327,
Internal ChangesSection of the release
What
Hooks are your own scripts that Claude Code runs at set moments. PostToolUse hooks run after a tool call succeeds, and PostToolUseFailure hooks run after one fails. A tool call is one action Claude takes, such as running a command or editing a file.
These hooks used to start a new process every time. They can now reuse a shell that is already running and waiting, when Claude Code allows it for that call. The text a hook prints is now also kept as a lasting record in the session.
Why
Starting a fresh process for every hook takes time. Reusing a waiting shell cuts how long these hooks take to run.
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 sinceAnthropic's documentation has since written up PostToolUseFailure, on Hooks reference.For redaction or transformation use cases, intercept at `PreToolUse` for outbound tool inputs and `PostToolUse` for the results of successful calls. `PostToolUseFailure` can't rewrite a result, so it can't redact a failing command's output.hookssee the edit
Confirmed sinceAnthropic's documentation has since written up PostToolUse, on Claude Code changelog.* Changed Code Mode to no longer run UserPromptSubmit hooks, managed ones included, on scripts' output; to redact that output, use a PostToolUse hook with `updatedToolOutput`changelogsee the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up PostToolUse, on Claude Code changelog.