My agent had just finished a small task: hand out leftover cents fairly when a bill is split between people. It ran the tests. They passed. Then it "simplified the rounding" in one more edit and wrote the message I have read a thousand times:
All tests pass. Done.
They didn't. The tests ran before the last edit. The rounding was now wrong, and nothing in the chat told me so.
This post is about the small rule I added to my workflow because of moments like this: a task is not done because the agent says so. It is done when a check that the tool ran itself says so, on the code as it is now.
"Done" is a sentence, not a fact
If you work with Claude Code, Codex or Cursor, you know the pattern:
- the agent says the tests pass, but it never ran them;
- it ran them, then changed the code again;
- it ran a different command than the one that matters;
- the session ended, and nobody remembers what was checked at all.
None of this is malice. The agent is predicting a good ending to the conversation. "All tests pass" is a very likely ending. But it is just text.
I wrote earlier about why a project should remember more than a chat: plans, decisions and work in progress need to live outside one session. This is the second half of the same story. Remembering is not enough. The record also has to be true.
The rule: the tool runs the check, not the agent
I build and use Istok, a local CLI and MCP server that keeps tasks, attempts and checks for coding agents. The part that matters here works like this:
- The agent does not run
go testand tell me about it. It asks Istok to run it. - Istok runs the command, stores the exit code and the output, and fingerprints the code it checked: the Git commit plus every change on top of it.
- When the agent tries to close the task, Istok compares the code again. If the code changed after the check passed, closing is refused. The agent has to run the check again, or close the task as explicitly "not verified" with a reason.
Committing the checked changes does not count as a change. Editing the code does.
What it looks like
Before the edit, the check is tied to the code it ran on (output wrapped to fit the page):
$ istok task show 1
Checks
│ ✓ PASSED go test ./... exit 0 · 111 ms
│ run by Istok · tied to code (base 5604281)
The agent edits split.go. The same check is now marked:
Checks
│ ✓ PASSED go test ./... exit 0 · 111 ms
│ run by Istok · code changed since: run it again
The agent tries to close the task on it:
$ istok task done 1 ...
the code changed after validation 01a20ec5… (go test ./...)
passed; run the check again with run_validate, or complete
with not_verified_reason
So the tests run again, by Istok, and this time they tell the truth:
Checks
│ ✓ PASSED go test ./... exit 0 · 111 ms
│ run by Istok · code changed since: run it again
│ × FAILED go test ./... exit 1 · 113 ms
│ run by Istok · tied to code (base 5604281)
In practice the agent does all of this through MCP tools (run_validate, task_done). I only look at istok task show when I want to know what really happened.
What changed for me
I use Istok every day with my agents, across about 80 of my own projects.
A real example from the history of one of my side projects. Codex was upgrading an API from NestJS 11 to 12. At 08:43 pnpm build passed. A few seconds later pnpm lint failed with 88 errors. The agent fixed them, and at 08:45 lint passed too. If I had stopped reading there, I would have seen two green checks.
But the lint fix had changed how the Swagger setup was typed, and the next build failed:
src/main.ts(28,61): error TS2345:
Argument of type '() => OpenAPIObject' is not assignable
to parameter of type 'OpenAPIObject'.
The build that passed at 08:43 was a build of different code. The agent fixed the call and ran all five checks again: lint, build, type check, tests and peer dependencies. All of them passed at 08:46 on the same code, and only then was the task closed. Each of those checks is still in the task history, with its output.
The biggest change is not the bugs it catches. It is that I stopped re-reading the chat to guess what was checked. The task history answers that: every attempt, every check with its output, and whether it still describes the code.
What it is, and what it isn't
- Local. One SQLite file. No account, no cloud, nothing written into your repository.
- Works with Claude Code (there is a plugin), Codex, Cursor and other MCP clients.
- Several machines: an optional sync hub you run yourself. It stores only rows encrypted on your devices.
- Open source, Apache 2.0, written in Go.
- Not yet: native Windows (use the Linux build inside WSL), a team UI.
There are good tools nearby, and they are better at other things. Beads has a dependency graph, a ready queue and sync through Git. Task Master turns a PRD into a task plan. As far as I can tell, neither runs the checks itself or refuses a check that is older than the code. That is the one thing Istok is built around, and it combines fine with a planner.
Try it
With Claude Code:
/plugin install istok --marketplace vtimame/istok.sh
Or install the CLI (Linux, macOS):
curl -fsSL https://get.istok.sh | sh
# or: brew install vtimame/tap/istok
Then open your repository in the agent and say: "Register this project in Istok." Give it real work as usual, and look at istok task show afterwards.
- Repo: https://github.com/vtimame/istok.sh
- Quick start: https://istok.sh/docs/en/getting-started/quick-start
- Questions and ideas: GitHub Discussions
I'd like to hear where this breaks for you, and whether "the tool runs the check" is the right answer to agents that say "done" too early.

Top comments (5)
The fingerprint-after-the-check detail is the one that would have saved me — a passing test means nothing if the code changed after it ran. The NestJS example lands it: the build that passed at 08:43 was a build of different code, and the lint fix is exactly the kind of edit I'd have trusted without rerunning. Making the tool refuse to close the task until the check matches the current code is the right line to draw.
Thanks! The lint fix is the sneaky one: it looks too small to break anything. One detail I didn't fit in the post: committing the checked changes doesn't invalidate the check, only editing the code does, so the agent can still commit freely after a pass. What do you use today to keep agents honest?
Good catch on commits not invalidating the check — that is a real gap. Honestly, I do not have a separate tool for this yet. I re-run the check after the last edit and read the diff myself before I trust a "done". It is slow, but it has caught the small edits that a green check would have missed.
Small clarification: that part is on purpose. A commit doesn't change the code, so the check still describes it; only an edit does. Your routine (rerun after the last edit, read the diff) is exactly what Istok automates: the rerun is enforced, and the diff check becomes a fingerprint comparison. If you try it, I'd love to hear where it gets in your way.
The fingerprint closes the gap I hit most often, the edit after the green run. The one it leaves open bit me separately: a check that can't fail. Once 13 tests came back green while the line they were meant to test was commented out. Nothing was stale; they just never ran my code. Since then each check gets a control: the same command against a version that is known to be broken, and it has to go red. If the control passes too, the gate refuses instead of reporting green. A fingerprint and a control answer different questions, so I'd want both.