Unclear What Claude Code does when a hook returns the no-verdict code, and which hook events check for it, is not stated.
What
Hooks are commands that run automatically at set points while Claude Code works, and their exit code (the number a program returns when it ends) can count as a verdict such as allow or block. On Windows, hooks can run in PowerShell. A command that is only quoted text starts no program in PowerShell, and this case is now handled:
- For a PowerShell command hook with no explicit
shell, a statement made only of string expressions, with no sub-expression, now makes the script exit with a dedicated no-verdict code instead of falling through. Failures still exit 1, and the existing pass-through of exit code 2 is kept. StatusLine and FileSuggestion hooks are excluded. - A new check picks out PowerShell command hooks that are not async, have no args and have an
onFailureother than 'continue'. - The message shown when a hook fails because Git Bash wasn't found gains a first case for exit code 127. It explains that the command was only quoted strings, so PowerShell started no program, and tells you to install Git Bash, put the program in "command" and its arguments in "args", or set "shell" to "powershell".
- Separately, a new function checks a signed answer in JWS format (a standard for signed data) and reports it as no_answer, valid, unsigned or invalid.
Why
A Windows hook that only prints text is no longer misread as a verdict, and its author is told exactly why it ended with exit code 127 and how to fix it.
What Claude Code does when a hook returns the no-verdict code, and which hook events check for it, is not stated.