DirectoryProofKitNewsletterSponsor

← Directory

HOOK · Anthropic docs

Stop hook test gate

A Stop hook runs your test command. Exit 2 (or decision: block with a reason) prevents the agent from ending its turn, so it keeps working until the check passes.

proof: tests run countproof: logs blocks: agent stops before checks pass

Source

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

By harness

HarnessStatusHow
CursoradaptedCursor's stop hook cannot block but can return followup_message to auto-continue (loop_limit default 5). See the Cursor stop-loop entry.
Claude CodenativeConfigure under hooks.Stop in .claude/settings.json.
Grok BuildadaptedIn Grok Build PreToolUse is the only blocking event (docs.x.ai hooks). Gate git commit with PreToolUse instead.
CodexuntestedNo hook equivalent found in the cited Codex docs.
AGENTS.md genericunsupportedHooks are harness features, not AGENTS.md.

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.