claim-check: a Claude Code Stop hook that checks "done" claims

Claude Code says "done" or "fixed" when it didn't verify the change. claim-check is a Claude Code Stop hook that catches that claim before you trust it.
中文说明 · 0.5.1 · MIT · Python 3.9+, no dependencies · by Balance Zhao

If this saved you a bad merge, a star helps others find it.
Install in Claude Code:
/plugin marketplace add Balance0014/claude-code-claim-check
/plugin install claim-check@claim-check
Then run /reload-plugins if Claude Code asks, or start a new session.
Measured on my own sessions
On November 4, 2026, I replayed my own Claude Code history through the hook: 3,977 turns, after dropping 1,649 duplicates (resuming a session copies its earlier turns into a new file). Of those, 406 ended with a claim like "done," "fixed," "deployed" or "tests pass," and version 0.2.0 would have blocked 86.
77 of the 86 had no tool calls at all. In 76 of the 77, something had run successfully after the last edit, just in an earlier turn. I hand-checked 24 of the 86. Eighteen were wrap-ups that claimed finished work without citing a commit, test output or status code.
After I posted it, a commenter argued that the 77 matter most, because a hook that blocks a correct wrap-up gets turned off. So 0.3.0 counts a check from an earlier turn, as long as no code was edited after it. Of the same 406 claims, it blocks 2. The cost is that a wrap-up no longer has to show its proof.
How those 86 split, the rest of that hand check, and 17 "not found" turns are in The replay.
What counts as verification
- In the hook. A check from before the last code edit doesn't count. claim-check looks for a shell command, MCP tool, URL fetch or subagent that ran after that edit and didn't fail, in this turn or an earlier one. Reading the file again doesn't count, and neither does a look-only command (
cat, grep, git diff, and the rest of the list below). Saying it isn't verified yet always passes.
- Planned. Exit codes of test and build commands. Today any command that isn't on the look-only list counts, as long as it didn't fail, and the hook doesn't read the exit code. The words "exit code 0" in the reply count as cited proof only when that turn edited no code.
- Planned. Regression tests that fail before the change and pass after.
- Planned. Tests that load the changed file. The hook can see that a command ran after the edit. It can't see whether that command loaded the file.
How it works
This is a Claude Code Stop hook for anyone who has watched the agent say "it's fixed" or "tests pass" and later found out nothing had run. When the agent tries to end a turn after a claim like that, or after saying something doesn't exist, the hook looks at what actually happened in the session. If the proof isn't there, it sends the agent back once and says what's missing.
The two agent replies that have cost me the most time are "it's fixed," when nothing had run since the last edit, and "that isn't used anywhere," after one search. Both sound final, so I moved on, and didn't find out they were wrong until something broke.
What it checks
| The agent says | It needs |
|---|
| "fixed", "deployed", "tests pass", "done", "已修复", "已上线" | Something that ran after the last code edit and didn't fail: a shell command, any MCP tool (browser, API), a URL fetch or a subagent |
| The same, in a turn with no code edits and nothing run | A check from an earlier turn, if no code was edited after it. Otherwise, proof cited in the reply (see below). A turn that only edits docs passes. |
| "doesn't exist", "nothing calls it", "没找到" | Two lookups in this turn, of different kinds. The same search twice doesn't count. |
| "not verified yet", "untested", "还没验证" | Nothing. Saying it isn't verified always passes. |
The second lookup has to be a different kind. Searching for the same text again doesn't count, even in another folder or with different flags. A different text, a different file, or a different tool does. Shell grep and the Grep tool are different tools, and so are grep and rg. Reading a file and cat (or head) on that same file are one lookup.