Exit code 2 blocks the action; any other non-zero code does not.
On exit 2 the stderr is fed back to Claude. Choose exit codes or JSON output, not both.
One at a time. Tell it whether you knew, and the ones you did not stay in your pile.
On exit 2 the stderr is fed back to Claude. Choose exit codes or JSON output, not both.
On exit 2 the stderr is fed back to Claude. Choose exit codes or JSON output, not both.
command and http hooks are deterministic.prompt and agent hooks ask another model, so they are judgment, not a guarantee.
Exit 2 sends the errors back and the turn continues. Redirect the output to stderr so Claude sees it.
Edit|Write removes the "remember to format" rule.Deterministic formatting after every edit beats a line in CLAUDE.md that Claude might skip.
The turn then ends. CLAUDE_CODE_STOP_HOOK_BLOCK_CAP raises the limit.
For example, turn a test command into one that greps only failures, so far less output enters your context.
CLAUDE_MODEL variable.A PreModelSwitch hook receives the from and to models. The input JSON always carries session_id, cwd, permission_mode and effort.