Claude Code hooks can now block actions when a check fails to run
Claude Code 2.1.295 adds an onFailure setting for command and HTTP hooks. With the blocking option enabled, a hook that cannot start, times out or returns an unexpected exit code prevents the action from proceeding. This gives teams a way to make a broken check stop work instead of silently allowing it through.
Anthropic · Oct 8, 2026
Why it matters
An approval or validation hook is only useful if its own failure behavior matches the policy it is meant to enforce.
More context
Review the release and explicitly configure the blocking behavior for appropriate hooks. Test a successful check, a rejected action and an unavailable checker through your normal installation. The release also fixes tool restrictions and several remote MCP reconnection problems.
Keep in mind
This is an opt-in setting, not a claim that every existing hook now blocks on failure. Maintainer release notes establish intended behavior; we have not reproduced the fixes or audited policy coverage. Normal Claude Code access requirements still apply.
Original read