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

Claude Code v2.1.309 ·

PowerShell hooks can now block an action with exit code 2

A PowerShell hook that ends with exit code 2 now blocks the action, the same as a bash hook

You'll notice Bug Fixes
JSON All of v2.1.309
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…

See this entry in the whole of v2.1.309 →

Feedback