Show & tell: open-source verify-before-stop hook for Claude Code #710
ianymu
started this conversation in
Show and tell
Replies: 1 comment
-
|
This is a neat guard. One thing I'd consider adding is progress-based checks alongside verification. For example, if Claude keeps retrying the same command or enters a loop before reaching the Stop hook, fail early instead of waiting until the end. I recently came across https://github.com/FailproofAI/failproofai, which explores similar runtime guardrails like loop detection and execution policies. Feels like these kinds of hooks could work really well together. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey! Sharing an open-source Stop hook in case it's complementary to what you're building.
ianymu/claude-verify-before-stop — blocks Claude Code's Stop event if files changed but no
VERIFY_ACTION+VERIFIEDlog entry exists from the last 5 min. Catches the very common failure mode where the model says "all tests passing ✓" without actually verifying.Built over 12 months running Claude Code on 14 parallel projects. Pure bash + python3 stdlib, MIT, ~50 lines. Lives in
.claude/hooks/verify-before-stop.shand.claude/state/stop-verify.logfor audit trail.A few related artifacts you might find useful:
Curious if anyone here has built related guards. Drop them in a comment and I'll add to the repo with credit.
— Ian
Beta Was this translation helpful? Give feedback.
All reactions