DirectoryProofKitNewsletterSponsor

← Directory

HOOK · Anthropic docs

Block when a hook fails (onFailure)

Set onFailure: "block" on a command or HTTP hook so a missing script, crash or timeout blocks the action instead of letting it through.

proof: logs blocks: verification hook silently failing open

Source

https://code.claude.com/docs/en/hooks
Checked 2026-10-16. Read the original before installing.

By harness

HarnessStatusHow
CursoradaptedUse failClosed: true.
Claude CodenativeRequires Claude Code v2.1.295+. Note: no effect on Stop hooks.
Grok BuildadaptedNot documented for Grok Build; hooks fail open.
CodexuntestedUntested.
AGENTS.md genericunsupportedHarness feature.

By model family

Claudesource
GPTn/a
Grokn/a
Geminin/a
"source" = the source targets it; "untested" = not verified by ProofOfDone yet.

Proof of the week

One verification pattern every week, adapted per harness and model. No spam.