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

Plugin hook modules can block a tool call before it runs

A plugin hook that runs before a tool call can now deny it, and plugins get a clear reason when a message they add to the session is refused

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

Unclear It is not clear whether this plugin hook path is switched on for anyone, or what check decides that.

What

A hook is a piece of code that Claude Code runs automatically at a set moment. PreToolUse is the moment just before a tool call, meaning an action Claude takes such as reading a file or running a command. A hook of this kind supplied through the plugin hook system can now deny the tool call. When it does, the result shows as an error naming the hook and the tool, in the form Error: Hook PreToolUse:<tool>.

The way a plugin adds messages to the current session, meaning the ongoing conversation, is also stricter. It now accepts only two kinds of entry:

  • A hidden user message that is not shown as something you typed
  • A system notice

Anything else is refused, and the refusal says why.

Why

This extends the plugin hook system, which is not documented, so that a plugin can stop a tool call before it happens rather than only observe it. Plugin authors who add messages to a session should expect other kinds of entry to be turned away.

Read from
Names in the bundlePreToolUse
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.

Added since A small documentation edit on Automate actions with hooks touched a line naming PreToolUse after this was published. A [mod](/docs/en/plugins/mods/overview) you install that hooks `tool.check` can approve a call that your `PreToolUse` hook blocked, unless the hook is in managed settings. [Extend permissions with hooks](/docs/en/permissions#extend-permiss… hooks-guide see the edit
Confirmed since Anthropic's documentation has since written up PreToolUse, on Intercept and control agent behavior with hooks. To confirm the block, register the callback under `PreToolUse` with a `Write|Edit` matcher and ask the agent to create a file under `/etc`: the Write tool's result in the message stream contains `Writing to /etc is not allowed`, and no fil… agent-sdk/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 doubtIt is not clear whether this plugin hook path is switched on for anyone, or what check decides that.
Anthropic's documentation agreesAnthropic's documentation has since written up PreToolUse, on Intercept and control agent behavior with hooks.

See this entry in the whole of v2.1.285 →

Feedback