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.334 ·

Hooks can now be told why their rewrite of a REPL result was ignored

When a PostToolUse hook rewrites a REPL result in the wrong shape, a message can now go back to the hook, not only to the log

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

Unclear When the feedback message is sent, and where you would see it, is not known.

What

A PostToolUse hook is a script that runs after a tool call succeeds. It can replace the tool's result using updatedToolOutput. This concerns hooks that run in the background after the REPL tool, a tool that runs code step by step.

When such a hook returns a replacement that does not match the shape the REPL tool's result must have, Claude Code still logs a warning and ignores the replacement. It now also adds a message to the hook's feedback when a certain check passes. The summary of what was wrong is also built differently. Before, the warning only went to the log, with the first problem's message attached.

Why

If you write hooks, you may now see why a rewrite had no effect, instead of finding the reason only in the logs.

Read from
Names in the bundlePostToolUseupdatedToolOutput
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 PostToolUse, on Customize sessions in self-hosted environments. The hook fires when a session that spawned a child process ends; the `CLAUDE_RUNNER_EXIT_REASON` values below enumerate the cases. It can't fire when the runner terminates abruptly, such as a VM preemption or a power loss. If you need guar… self-hosted-environments-configuration see the edit
Added since A small documentation edit on Hooks reference touched a line naming PostToolUse after this was published. To add context to the parent session after a foreground subagent returns, use a [`PostToolUse`](#posttooluse) hook on the `Agent` tool. 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 doubtWhen the feedback message is sent, and where you would see it, is not known.
Anthropic's documentation agreesA small documentation edit on Hooks reference touched a line naming PostToolUse after this was published.
Anthropic's release notes agreeChanged managed PostToolUse hooks so that when a tool can't use a rewrite, Claude gets an error that says so; return the tool's own output…

See this entry in the whole of v2.1.334 →

Feedback