Under the hoodTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
HooksArea: what it touches
Internal ChangesKind: in v2.1.311,
Internal ChangesSection of the release
Unclear What the permission check does with this flag is not stated.
What
A hook is a command you configure to run at a set point while Claude works. A PreToolUse hook runs before a tool call, which is Claude using a tool such as running a command or editing a file. It can change the input the tool receives.
Claude Code now compares the input after the hook against the input Claude originally asked for. When they differ, it passes a flag, inputChangedByHook, to the step that decides whether the tool call is allowed.
Why
The permission check can now tell a hook's rewritten input apart from what Claude first requested, so rewritten input may be checked again or prompted for.
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 PreToolUse, on Changelog.* Changed a failed `PreToolUse` or `PermissionRequest` hook with `"shell": "powershell"` to block the call on PCs without Git for Windows unless it sets `args` or `"onFailure": "continue"`. If written for Bash: remove `shell`, add `"onFail…cowork/changelogsee the edit
Added sinceA small documentation edit on Modifying system prompts touched a line naming PreToolUse after this was published.* To stop only `@` file mentions from expanding, set [`CLAUDE_CODE_DISABLE_FILE_MENTIONS=1`](https://code.claude.com/docs/en/env-vars#variables) instead, on Claude Code v2.1.299 or later. Claude then gets the mentioned paths plus a note to…agent-sdk/modifying-system-promptssee 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 doubtWhat the permission check does with this flag is not stated.
Anthropic's documentation agreesA small documentation edit on Modifying system prompts touched a line naming PreToolUse after this was published.