You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
HooksArea: what it touches
ImprovementsKind: in v2.1.328,
ImprovementsSection of the release
Unclear The new wording of the message is not known.
What
A hook is a script Claude Code runs at set points, and onFailure decides what happens if it fails. When a hook with onFailure set to "block" fails or times out, Claude Code shows a message about it. That message used to be fixed text saying the hook timed out or failed and was blocking because onFailure is "block". It is now assembled in parts, and the hook's own output is also passed through a separate step before it is shown.
Why
If you write hooks, the text you see when a blocking hook fails may now be worded differently.
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 onFailure, on Run tool calls from code with Code Mode.On v2.1.329 or later, expect a call from code to run by default after a hook failure other than `the hook did not finish`. To choose whether the call runs, use a `command` or `http` hook and set [`onFailure`](https://code.claude.com/docs/e…code-modesee 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 doubtThe new wording of the message is not known.
Anthropic's documentation agreesAnthropic's documentation has since written up onFailure, on Run tool calls from code with Code Mode.