You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
WindowsArea: what it touches
ImprovementsKind: in v2.1.309,
ImprovementsSection of the release
What
A hook is a command Claude Code runs automatically at set points while it works. You configure it in your settings. This release improves the messages shown when a hook's command is set up in a way Claude Code cannot run.
When a hook is blocked because Git Bash was not found, the message is now tailored to the hook. Git Bash is the shell many Windows setups use to run hook commands. The message now says that only exit code 0 or 2 counts as the hook's verdict. Before, it only said the hook did not set "shell" to "powershell".
PowerShell hooks are told to finish with exit code 0 or 2, or to set "onFailure" to "continue".
Other hooks are told to put the program in "command" and its arguments in "args", with "onFailure" set to "block".
A new error message says to put the program in "command" and its arguments in "args", or to set "shell" to "powershell" on a command written for PowerShell. It appears when a whole command line is given where a program and its arguments are expected.
Why
On Windows especially, a hook can fail for reasons that are hard to work out from a generic message. These messages tell you which settings to change to make the hook run.