Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.326 ·

Hook output naming the wrong hookEventName is now ignored with a warning

When a hook's hookSpecificOutput names a different event than the one it ran for, Claude Code now ignores that output and logs a warning

Group of 2 You'll notice Improvements
JSON All of v2.1.326
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
HooksArea: what it touches
ImprovementsKind: in v2.1.326,
ImprovementsSection of the release

Unclear It is not clear which prompt is held back when the event names don't match.

What

Hooks are your own scripts that Claude Code runs at set points, such as before a tool call. A hook's reply can include a hookSpecificOutput section, which carries a hookEventName saying which event the reply is meant for.

Claude Code now checks that name against the event the hook actually ran for:

  • If they differ, the hookSpecificOutput is ignored, a warning is logged telling you to set hookEventName to the right event, and the original prompt is suppressed.
  • A reply whose decision is "block" and whose hookSpecificOutput names a different event is treated as a mismatch.
  • The check is skipped for PermissionRequest hooks.

Before, hookSpecificOutput was used without checking the event name.

Why

A hook that returns the wrong hookEventName will stop having its specific output applied. If a hook seems to have stopped working, check the warning and the event name it returns.

Read from
What the documentation says
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 hookEventName, on Run tool calls from code with Code Mode. "hookEventName": "PostToolUse", code-mode see the edit
Confirmed since Anthropic's documentation has since written up hookSpecificOutput, on Run tool calls from code with Code Mode. "hookSpecificOutput": { code-mode 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 doubtIt is not clear which prompt is held back when the event names don't match.
Anthropic's documentation agreesAnthropic's documentation has since written up hookSpecificOutput, on Run tool calls from code with Code Mode.

See this entry in the whole of v2.1.326 →

Feedback