jev-belay
Claude Code says "Done, tests pass." jev-belay checks whether anything ran before it
lets that stand.
A Stop hook. It reads the turn's transcript locally, and only when files changed and no
check has passed since does it spend one Jev call, four questions, $0.00005, on whether
the closing message is an unverified "done". If it is, the turn does not end: Claude gets
the reason and goes back to run the suite. Every other stop costs nothing. Every error
path lets the turn end.
Measured on 100 labeled stops from a real corpus: AUROC 0.976 at telling a false done
from an honest one, against 0.777 for judging the wording alone. At the shipped threshold
it blocks 8 turns in 100, 7 of them rightly. Jev answers in 346 ms at the median.
/plugin marketplace add valentynkit/jev-belay
/plugin install jev-belay@jev-belay

One real session, nothing typed for the camera, answers from jev-1.13.0. Claude renames
a function across two files, says "Renamed parseRows to parseCsvRows in both files,
added jsdoc. Tests updated to use new name", runs nothing, and gets blocked: 0.96 that it
reports done, 0.89 that a test would apply, 0.11 that it claimed one ran, because it did
not. It then runs the suite itself, finds a CRLF bug the rename exposed, fixes it. The next
task ends on a passing check and the gate stays out of the way, free. demo/README.md has
the one command that records it.
A belay catches the fall. It does not stop the climb.
Why
Agents say done. Sometimes nothing ran, sometimes the suite ran and failed and the summary
says pass anyway. Reading every closing message is the job you installed the agent to
avoid, so the check has to be automatic, cheap, and wrong in the safe direction.
The obvious version has been measured and it does not work. limpet published a calibration
run over 1,500 real stops where its rule "don't say done without running the tests" came
out at AUROC 0.50, a coin flip, and was left in shadow mode. One run, noisy
auto-labels, but it is the best evidence anyone has, and it names a missing variable
rather than a dead idea: that rule judges the message with no run facts in front of it.
jev-belay establishes the facts first. Two regex belts read the transcript slice since your
last prompt: one for a test, build or lint runner named in a command, one for the runner's
own summary in the output, because Claude Code records a runner's nonzero exit with no
error flag anywhere. If a check passed after the last change, the hook exits and Jev is
never asked. Only when something changed and nothing proved it does the question go out,
and the answer is read next to that evidence.
The honest limit, up front: a turn with no file edits never reaches the question, so a
read-only "confirmed, tests pass" sails through. The evidence gate is what makes the rest
work, and it is also what makes that case invisible.
What it costs
Measured over 122 direct API calls to jev-1.13.0, the two ablation runs of 2026-09-19 and
2026-09-20:
| per stop that reaches the question |
|---|
| Jev calls | 1, four questions in it |
| input tokens | 1,222 median, 686 to 2,119 |
| cost | $0.00005 at $0.042 per million, output free. A thousand checks cost five cents |
| latency | 346 ms median, 433 ms p90, 276 ms best, end to end from the hook |
| stops that reach it | 17.7% (477 of 2,694 stops in one real corpus) |
| stops that do not | a transcript read, no network |
Install
As a plugin:
/plugin marketplace add valentynkit/jev-belay
/plugin install jev-belay@jev-belay
Claude Code asks for your TypeSafe key when it enables the plugin and keeps it in the
Keychain; threshold, decision log, shadow mode and your own check command are asked at the
same time and change in /config.
Or by hand in ~/.claude/settings.json. The hook reads the environment and nothing else,
so the key goes in an env block beside the hook line:
{ "env": { "TYPESAFE_API_KEY": "sk-..." },
"hooks": { "Stop": [{ "hooks": [{ "type": "command", "command": "node ~/src/jev-belay/belay.mjs", "timeout": 25 }] }] } }