Unverified60% confidenceFactTime unknown
In Claude Code Hooks, exit code 0 means pass-through, exit code 2 means hard block (the AI will not retry), and other non-zero exit codes mean soft warnings.
2
Sources
60%
Confidence
Long-term
Relevance
5/31/2026
First Seen
Sources
Related Entities
Related Claims
UnverifiedClaude Code v2.1.295 introduces the onFailure: "block" option for command-type and HTTP-type Hooks, which allows a failed Hook to directly block the corresponding operation.71% similarUnverifiedIf the hook script itself crashes, Claude Code skips that hook and continues executing the original action, i.e. the default behavior when a hook fails is to allow rather than block.70% similarUnverifiedWhen a hook crashes, times out, or the script is missing, Claude Code's default behavior is to let the tool call pass through directly (fail-open).69% similarUnverifiedIn Claude Code v2.1.307, when faced with an unparseable tool call, Claude Code retries at most twice before ending the turn with an error.67% similarUnverifiedClaude Code可通过添加--dangerously-skip-permissions启动参数来减少确认频次67% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/12116API
curl https://kongchang.com/api/v1/knowledge/claims/12116MCP
get_claim(id=12116)