claim-check
It told you the tests passed. What is that based on?
A Claude Code plugin with two separate parts:
- A Stop hook that reads the final message, finds the claims in it, and says what the session
transcript can and cannot show about each one. It never confirms a claim and never refutes one.
- An opt-in pytest runner that writes a receipt of one run, and a checker that compares a
precisely scoped claim with that receipt. This is the only place a
supported or
contradicted verdict comes from.
claim-check — what the final message claims, and what this transcript can show
insufficient All tests pass
1 tool request naming a test runner was seen. A request is not a result,
and this hook does not evaluate tool results: nothing here binds an exit
code or a report to the claim.
unchecked claimed a commit
no shell-tool request was seen. That does not show it did not happen:
hooks, subagents, scripts and your own shell are not in view.
note: claim-check counts tool requests in the transcript. It does not evaluate their
results or effects. It cannot confirm or refute a claim. The labels above
describe what was checkable here, not whether the claim is true.
Install
/plugin marketplace add Rul1an/claim-check
/plugin install claim-check@claim-check
Works in the Claude Code CLI and the desktop app. The hook needs Python 3.9+ and nothing else: no
network calls, no configuration, no telemetry. The runner needs pytest in the interpreter you start
it with. The runner and the checker are POSIX-only: the working directory and declared files are
handled as POSIX paths, and on Windows every run is refused.
Why
Agents claim completion they have not earned, and the cause is structural: training on human
feedback rewards answers that sound finished. "All tests pass" lands well whether or not a test
ran. The useful question is what the claim rests on, and the answer has to come from somewhere
other than the model's own account.
Four verdicts
| Verdict | Meaning | Where it can come from |
|---|
supported | a receipt, bound to the claim's exact scope, records every selected test passing | the checker only |
contradicted | a receipt, bound to the same scope, records a selected test failing | the checker only |
insufficient | there is something to look at, and it does not decide the claim | hook and checker |
unchecked | nothing here can assess this kind of claim | hook and checker |
Part 1: the Stop hook
At the end of a turn the hook reads the transcript and takes the final assistant message. Finding
claims in prose is heuristic; what it says about each claim is fixed by rule.
| Claim in the final message | Verdict | What the report states |
|---|
| "all tests pass", "the test suite passes", "I ran the tests" | insufficient | how many tool requests named a test runner |
| "I committed", "I pushed" | unchecked | how many shell-tool requests were seen; their text is not read |
"I updated path", "I did not touch path" | unchecked | how many editing-tool requests named a path ending in path |
The hook counts tool requests. It does not evaluate tool results, even where the transcript
carries an exit code or a test summary: nothing in the hook binds such a result to a claim. And a
transcript does not show what a hook, a subagent, a script or your own shell did. So:
- A request that was seen does not confirm anything.
echo pytest names a test runner.
- A request that was not seen does not refute anything. Tests can run where the hook cannot look.
- Every recognised claim is reported. Silence means no claim was recognised, not that one checked
out.
The hook is report-only. CLAIM_CHECK_ENFORCE, which made 0.2.0 hand contradicted claims back to
the agent, is ignored: the hook has no verdict it could block on.
Limits of the hook
- Claim detection is heuristic and English-only. Hedged, conditional and instruction-shaped
sentences are dropped. A message in another language is reported as unchecked, once per session.
- Negation is a word rule. A claim is dropped when
nothing, none, neither, nor or no
comes before it in its sentence, so "Nothing was edited, committed or pushed" is not a commit
claim. The same rule drops "There was no reason to wait, so I committed". A dropped claim costs
one line of report.
- Only the current final message is assessed. If a user turn or a tool request follows the
last prose in the transcript, the hook says nothing.
- Command text never reaches the report or the log. Counts and the claimed sentence do.
- Requires
python3 on PATH. Untested on native Windows.
Part 2: a pytest receipt, and a claim scoped to it
Nothing here runs unless you start it.