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.334,
ImprovementsSection of the release
What
A PostToolUse hook runs after a tool call succeeds, and can rewrite the tool's result with updatedToolOutput. Each tool's result has an expected shape, meaning the fields and types it is made of. If a hook's updatedToolOutput does not match that shape, Claude Code now reports it as a hook error. The error is non-blocking, so the session carries on.
Why
If you write hooks, you now find out when your rewrite was not used, instead of it being dropped without a word.
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 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-configurationsee the edit
Added sinceA 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.hookssee the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
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…