Claude Code allows hooks to fail by blocking action
Version 2.1.295 adds onFailure: "block" so an action does not go through if its control hook fails to start or fails during execution.
stable release
Facts, analysis and limits
Verified facts
- Works for command hooks and HTTP.
- An impossible start, timeout or unexpected code can block the action.
What changes
A security check may be explicitly fail-closed.
Practical implication
Enable onFailure: "block" for security hooks and test a timeout.
Availability
Claude Code 2.1.295 or later; no Belgium/EEA restriction in the notes.
Limits and uncertainty
No independent product testing or account-access check was performed for this entry.