# Stop hook verify-done

> A Stop hook that demands proof of completion - named check, exit code, real output - blocks the agent from ending the turn unverified. Mechanism, not plea.

URL: https://bartlomiejkrupa.dev/notes/stop-hook-verify-done/
Category: snippet | Updated: 2026-10-07
Summary: A Stop hook that demands proof of completion - named check, exit code, real output - blocks the agent from ending the turn unverified. Mechanism, not plea.

The [minimal harness](/articles/claude-code-harness-starter) pairs a `verify-done` skill with a **Stop hook** that fires when the agent tries to declare the task complete. No verify proof → no stop. Full log dump with no real test output → no stop, if your hook script checks for real test output. Claude Code caps this at eight consecutive continuations, after which it ends the turn anyway.

That is why it is a hook instead of only a skill: [verify before done](/notes/verify-before-done) as discipline decays; as mechanism it holds.

## Shape

1. Skill at `.claude/skills/verify-done/SKILL.md` - when the agent claims done, demand a named check and its exit code in the transcript.
2. Stop hook - harness-enforced gate; blocks stop if proof is missing or incomplete.
3. Pair with a [verifiable completion condition](/notes/verifiable-completion-condition) stated up front.

Install the ten-file set with one command:

```bash
npx leanharness
```

The appendix and article walk the wiring; this note is the atomic rule: **proof in the transcript, or the turn does not end.** Related enforcement pattern: [hook over prose](/notes/hook-over-prose).

Sources:
- Hooks reference: https://code.claude.com/docs/en/hooks
- Best practices for Claude Code: https://code.claude.com/docs/en/best-practices
