You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
HooksArea: what it touches
Bug FixesKind: in v2.1.309,
Bug FixesSection of the release
What
A hook is a command you configure to run at certain points, and ending it with exit code 2 tells Claude Code to block the action. For hooks run in PowerShell, Claude Code now adds a short line to the end of the command that passes exit code 2 through. Before, the command ran unchanged and an exit code 2 did not block.
This is not added to PermissionRequest hooks, or to some commands that pass an extra check.
Why
Blocking hooks now behave the same on Windows PowerShell as in bash.
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agreeFixed hooks that run in PowerShell not blocking when the hook's program exits with code 2, and on Windows PreToolUse and PermissionRequest…