Your AI agent says "Done. All tests pass." How often is that true?

We measured it. We took 200 AI-written changes to 23 real open-source libraries. Each one is a real historical bug fix that an AI attempted, and hidden tests (which the tool never sees) say whether the AI got it right.

107 of the changes were wrong. 22 of those 107 passed the library's own test suite. That's 1 in 5 wrong changes that would sail through CI.

a real run: tests 37/37, apex verify NOT READY

What "green but wrong" looks like

The task: make cookie values strict RFC 6265 cookie-octets, "optionally wrapped in double quotes". The AI's change passes all 37 of the library's tests, and the hidden upstream tests too. But it now throws on "bar", a double-quoted value the task says is valid. Real cookies break in production.

How Apex verify catches it

Apex verify is an open-source CLI, GitHub Action and Claude Code / Gemini CLI hook. It does three things:

  1. A second AI writes tests from your task text, never from the agent's code. A model grading its own work shares its blind spots.
  2. Every check must fail on the old code. A check that can't tell old from new proves nothing and is thrown away.
  3. Your own tests run before and after, and it scans for deleted, skipped or weakened tests.

The verdict is ready, not ready or unknown, never a silent pass.

The numbers

On 200 AI changes to 23 real libraries The project's tests Apex verify
Wrong changes caught 85 of 107 107 of 107
"Ready" verdicts that were right n/a 66 of 66
Good changes blocked 10 of 93 17 of 93

And on 78 real pull requests that AI agents (Codex, Copilot, Cursor, Claude Code, Devin…) opened and got merged in public repos, it gives a verdict on 60% and says exactly why on the rest.

Where it's wrong

It blocked 17 changes the benchmark labels right. We read every one, and ran its checks against the upstream fix: 12 really didn't do what the task says (the hidden tests just don't test that point). So 3 to 5 in 93 are its own mistakes. Verdicts can also change between runs, because the checks are written fresh each time. That's the next thing we're fixing.

It reviewed its own release

The funniest moment of this release: Apex verify runs on its own pull requests. On the 0.3.7 release, which an AI helped write, it said NOT READY: the release notes promised the GitHub Action installs JavaScript dependencies, but there was no way to turn that off. It was right. We fixed it before shipping. It also flagged a test of ours wrongly, and that became 0.3.8.

Try it

No API key needed if you have Claude Code or Gemini CLI signed in:

npx --yes https://github.com/apex-engine-dev/apex-verify/releases/download/v0.3.7/apex-verify-0.3.7.tgz verify --demo 

Then on your own project: ... verify "what you asked the AI to do".

It's Apache-2.0. If it catches something for you, a ⭐ on GitHub helps others find it. If it gets something wrong, open an issue: wrong verdicts are the most useful bug reports.