What probably matters to youSection of the release
What
A hook is a check you set up that runs at a set moment, for example before Claude uses a tool. Some hooks call an MCP tool, a tool provided by an add-on server. Those hooks now take an onFailure setting. It decides what happens when the hook's call fails, for example because its MCP server is not connected or not signed in:
continue is the default and lets the action go ahead.
block stops the guarded action every time the call fails.
Any other value is treated as block.
Why
You can now make a safety hook strict. With block, an action the hook guards cannot slip through just because the server behind the hook was unavailable.
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
Confirmed sinceAnthropic's documentation has since written up mcp_tool, on spans.| `mcp_tool_use` | `tool_call` with `anthropic_mcp_server_name` |api/opentelemetry/spanssee the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up mcp_tool, on spans.
Anthropic's release notes agreeAdded "onFailure": "block" for mcp_tool hooks, as for command and HTTP hooks: a hook whose call fails blocks the action