Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.300 ·

Hooks that check tool calls are handled more strictly

PreToolUse and PermissionRequest hooks now have input rewrites validated, fail toward refusing or asking, and can't switch mode in some cloud sessions

Group of 7 You'll notice Improvements
JSON All of v2.1.300
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.300,
ImprovementsSection of the release

Unclear Whether a malformed hook change is refused in an interactive session when the remote setting is off, or only recorded, is not settled.

What

Hooks are your own commands that Claude Code runs automatically at set points. A PreToolUse hook runs before a tool call (an action Claude wants to take, such as running a command or editing a file) and can block it. A PermissionRequest hook runs when a tool call needs a permission decision. Several parts of how these hooks are handled changed, mostly so that a hook problem leads to refusing or asking rather than running the call anyway. Claude Code already refused input changes from plugin hooks running on another machine; these changes go further:

  • updatedInput checks: when one of these hooks sends back updatedInput (a changed version of the tool call's input), the change is now checked against the input the tool expects. The call is denied if that check fails, if the tool's own validation refuses the input, or if the check itself crashes. Unknown keys are dropped and any key starting with __artifact is refused. Dropping and denying are enforced only in some cases (the finding points to non-interactive sessions, or a feature flag allowing it); otherwise the original input is kept and the check is only recorded.
  • Refusal wording: the reason given when an updatedInput change is refused now has two versions, chosen by an ofSettings flag, instead of one fixed message.
  • Unfinished hooks: when a PreToolUse hook does not finish (for example it hangs or is stopped), the call is still refused, the block is now marked with hookDidNotFinish, and the event is recorded. If the call was already denied for another reason, that original deny is now kept instead of being replaced.
  • Unread organization settings: when your organization's managed settings (settings an administrator applies for everyone) could not be read, your own hooks and mods do not run, and a tool call a PreToolUse hook should have checked asks you for permission instead of being allowed. The message says the hook isn't running because your organization's settings couldn't be read.
  • Managed hooks that fail to load: settings validation now explains that a PreToolUse or PermissionRequest hook in the managed settings document that cannot be loaded does not run, nor does any other hook in that document, while the managed settings document itself is not skipped, unlike a user or project settings file.
  • setMode removal: when a PermissionRequest hook answers allow, any setMode update in that answer (a request to switch the session's permission mode) is now removed in a Cowork cloud session or where an MCP tool is declared as code-running.

Why

If you write hooks, a hook that returns malformed updatedInput or never finishes may now get tool calls denied, and missing organization settings can turn silent approvals into permission prompts. In Cowork cloud sessions and with code-running MCP tools, a hook can no longer use its allow answer to change the session's permission mode.

Read from
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 Run Claude Code programmatically touched a line naming PermissionRequest after this was published. Calls to tools you didn't list run if they need no approval. In a [Manual mode](/docs/en/permission-modes#available-modes) `claude -p` run, a call that needs approval is denied unless something approves it, such as a [`PermissionRequest` h… headless see the edit
Added since A small documentation edit on Hooks reference touched a line naming PreToolUse after this was published. An [Agent SDK callback hook](/docs/en/agent-sdk/hooks) on `PreToolUse` that exceeds its timeout blocks the tool call, and Claude receives an error result naming the timeout. hooks see the edit
Confirmed since Anthropic's documentation has since written up updatedInput, on Intercept and control agent behavior with hooks. This example intercepts Write tool calls and rewrites the `file_path` argument to prepend `/sandbox`. The callback returns `updatedInput` with the modified path and `permissionDecision: 'allow'` to auto-approve the rewritten operation: agent-sdk/hooks see the edit
Confirmed since Anthropic's documentation has since written up PermissionRequest, on Error reference. | `Managed settings contain invalid entries, including PreToolUse/PermissionRequest hooks that are NOT loaded; fix or remove each entry:` | [Configuration warnings](#managed-settings-hooks-not-loaded) | errors see the edit
Confirmed since Anthropic's documentation has since written up PreToolUse, on Claude Code changelog. - Fixed artifact updates being refused where a PreToolUse hook covers Edit or Write; Claude now edits the file and then republishes instead of changing it in the publish call changelog 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 doubtWhether a malformed hook change is refused in an interactive session when the remote setting is off, or only recorded, is not settled.
Anthropic's documentation agreesAnthropic's documentation has since written up PreToolUse, on Claude Code changelog.
Anthropic's release notes agreeChanged PermissionRequest hooks in Cowork cloud sessions: a setMode update in a hook's allow is now ignored; the rest of the approval still…

See this entry in the whole of v2.1.300 →

Feedback