completion-claim-check
Blocks the stop once when the agent says the work is done, the git working tree is dirty and the reply shows no verification evidence.
- Reply quality
- When a reply ends
- Claude Code
- Codex
What it blocks
| Reply and working tree | Result |
|---|---|
已完成修改。, uncommitted changes | Blocked once |
All done, the bug is fixed., uncommitted changes | Blocked once |
Done. Ran pnpm test: all green | Allowed: evidence |
改完了,浏览器部分 UNVERIFIED | Allowed: marked |
已完成 with a clean tree, or 还未完成 | Allowed |
What the agent sees when blocked
The reason is written in Chinese. It says the reply claims completion while the working tree has uncommitted changes and no verification evidence, and asks for the commands and results, or UNVERIFIED marks:
你说已完成,但工作区有未提交改动,回复里没有验证证据。补上验证命令和结果,或把没验证的项标成 UNVERIFIED。
In Codex the reason arrives as a continuation prompt, and the agent replies once more.
Why this plugin
Scenario
The agent ends a turn with "done" or "已完成", yet the reply has no verification evidence: no command it ran, no test result, nothing marked as unverified.
Why use it
- You find out at the end of the turn, not later, that a claim was never checked.
- The agent gets one more step to add the commands it ran and their results, or to mark what it did not verify as
UNVERIFIED. - It blocks at most once per turn, so a turn never loops.
How it works
A Stop hook runs scripts/completion-claim-check.sh when the agent tries to end its turn. It blocks only when all of these hold:
- The stop flag is not set (
stop_hook_active), so this is the first stop of the turn. - The working directory is a git worktree with uncommitted changes (
git status --porcelain). - The last reply claims completion:
已完成,改完,已修复,搞定,done,fixed,all setand similar. Negations such as未完成ornot done yetdo not count. - The reply has no evidence: words such as
验证,测试,test,pytest,pnpm,PASS,FAIL,UNVERIFIED,exit code, or a code block.
The host is read from the payload itself. Claude Code and Codex send snake_case fields, Grok Build sends camelCase; both are read on every call. A --agent claude|codex|grok argument is still accepted for existing hook files.
Every error allows the stop (exit 0, no output). git status is abandoned after 3 seconds. No network, no model call.