AI Disruption

AI Disruption

I Installed a Sign-Off Inspector for My Claude Code

Learn how to set up a Claude Code Stop Hook that reviews every completed task, catches failing tests, and forces the agent back to work until everything passes.

Meng Li's avatar
Meng Li
Nov 22, 2026
∙ Paid

Last Wednesday at 11 p.m., I asked Claude Code to add idempotency logic to a payment callback. Ten minutes later, it replied:

Done. Modified 3 files, tests pass.

I ran npm test myself. Red.

It wasn’t lying on purpose. After editing that one file, it had only run a single test, not the full suite. When I asked “is it done?”, it looked at its own earlier summary and just went along with it.

After this happened twice, I decided to stop relying on asking nicely. I gave it a sign-off check: every time it wants to say “done,” it first has to pass a checklist, and if it fails, it keeps working.

The mechanism is a Stop Hook, but not the shell-script kind I used to write. Claude Code’s Hooks can now have a model do the grading directly.

User's avatar

Continue reading this post for free, courtesy of Meng Li.

Or purchase a paid subscription.
© 2026 Meng Li · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for writing, podcasting, and media founders.