3 ms·
The "cat" command always exists with code 0. You need to exit with code 2. https://code.claude.com/docs/en/hooks#exit-code-2-behavior-per-event https://code.cl
by AftHurrahWinch 5mo ago
The "cat" command always exists with code 0. You need to exit with code 2.
https://code.claude.com/docs/en/hooks#exit-code-2-behavior-per-event https://code.claude.com/docs/en/hooks#exit-code-2-behavior-p...
- tadfisher 5mo agoLooks like stdout is also ignored with code 2, and you need to output plain text on stderr: "Exit 2 means a blocking error. Claude Code ignores stdout and any JSON in it. Instead, stderr text is fed back to Claude as an error message."
- astrod 5mo agoI'm pretty sure I use console.error and code 2 using the typescript SDK.