Unverified70% confidenceFactExact time
Claude 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.
2
Sources
70%
Confidence
Medium-term (~90 days)
Relevance
10/8/2026
First Seen
Valid until: 1/6/2027
Sources
Related Entities
Related Claims
UnverifiedIf 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.74% similarUnverifiedIn 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.71% similarUnverifiedFor Claude Code users, upgrading to v2.1.295 and configuring onFailure: block is the most direct way to obtain fail-closed behavior.69% 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).67% similarUnverifiedClaude Code v2.1.301 fixes the silent failure problem where a workflow agent, after reading a harness note whose task text does not carry user authorization, may skip steps while the run still reports success.64% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/989356API
curl https://kongchang.com/api/v1/knowledge/claims/989356MCP
get_claim(id=989356)