Claude Code Shows Hook Failures in Red and Explains Hook Blocks in the Transcript
Claude Code 2.1.326 colors hook failures red and hooks that stop Claude yellow, with the reason shown beneath. A PreToolUse hook exiting 127 now warns its check may not have run, and a "decision": "block" now holds in more cases.
Key Takeaways
- Failures are red, stops are yellow, with the reason underneath.
- Exit code 127 now warns the check may not have run.
updatedInputrewrites survive multi-hook answers more often."decision": "block"holds in more cases, which can newly block calls.- Crashed hooks show full errors, up to 10,000 characters via Ctrl+O.
- HTTP hooks ignore length headers set in config.
Clearer transcript
Hook failures, blocks and timeouts in the transcript are now distinguishable: failures are red instead of grey, a hook that stops Claude is yellow, and the reason is shown under them. A crashed Node or Python hook now shows the error rather than only the first line of a stack trace, and Ctrl+O shows up to 10,000 characters of output.
Behavior changes
A PreToolUse hook that exits 127 now produces an error saying its check may not have run. When more than one hook answers a tool call, a PreToolUse hook's updatedInput is kept in more cases, so the rewrite runs more often. A hook's "decision": "block" now holds in more cases, so a hook that always prints one may start blocking calls. HTTP hooks ignore Content-Length and Transfer-Encoding in their headers setting.