I secretly planted 22 bugs in Claude Code's game. Its checks followed the official recipe and still missed one

I gave Claude Code three hours to build a small tile-merge game and to verify it the way the Claude Code team says it verifies its own work. It stopped after 114 minutes and reported 87 passing tests and 34 of its own 34 planted bugs caught. What it did not know: I had a list of 22 more bugs. I kept the list back until the run had handed in its work and its checks were frozen. Then the same agent planted them in a copy of the game, one at a time, and ran the frozen checks against each. I call them the outside planted bugs. The automated checks caught 21 and missed 1. This post shows why that one got through and what the other outside checks found, with every raw output published next to it.
You can play the game. All raw outputs are in this archive (2.4 MB); FACTS.json inside it lists the source of every number in this post.
The run's own account: 34 of 34 planted bugs caught. The outside planted bugs: npm run verify caught 21 of 22. The one it missed was on screen the whole time: a floating "+8" where the player had scored 16.
What I found
- Of the 22 bugs I planted,
npm run verifycaught 21, and the 1 it missed got past every automated check and was caught only by a reviewer reading the diff. (Section "Outside check one") - The cheap tests are blind to everything outside the engine: unit, property and differential tests caught 0 of the 7 outside planted bugs in the feel, and end-to-end tests caught 6. (Section "Outside check one")
- The rules themselves are right: the reference and the game's engine played 2,000 games and 288,259 moves with 0 differences. (Section "Outside check two")
- The checks were not weakened after they were frozen, but 4 of 26 stamped claims could not be confirmed. (Section "The audit")
- 81 of the 114 minutes went to checks and verification, and 33 to the game. (Section "Time")
The game
The game is called Overprint. It is a 4×4 board of printed tiles: you slide all tiles in one direction with the arrow keys, WASD or a swipe, two equal tiles that collide become one tile with their sum, and after every move one new tile appears. Everything is drawn on a canvas and every sound is synthesised in code; the shipped game has no runtime dependency.

It has three rules of its own, all fixed by the task before any code existed:
- A multiplier inside each move. The first merge of a move scores its value ×1, the second ×2, the third ×3. One move that merges
2 2 4 4into4 8scores 20 points and not 12. - Three undo charges per game. Undo puts back the board, the score and the random state, so repeating the move gives the same new tile. You cannot use undo to get a better tile.
- A seeded board. Without a seed in the URL the seed is today's UTC date, so everybody who makes the same moves on the same day gets the same tiles.

The official recipe
The task quoted "How the Claude Code team thinks about verification" (claude.dev blog, 16 November 2026) and turned it into eleven instructions. I call this the official recipe. The quotations below are the lines of the task, which is saved unchanged in the repository as SPEC.md.
If you have to focus on one test type, pick end-to-end.
SPEC.md
The run wrote 40 end-to-end tests before it froze its checks and had 48 at the end. They drive the real page in Chrome with real keys and touch events.
Differential tests: the old system is the oracle.
SPEC.md
There was no old system, so the run had a sub-agent that had not seen the engine write a naive second implementation, and compared the two in 3 differential tests. It also wrote 27 unit tests and 9 property tests with generated inputs.
If a change can modify the check that judges it, the check is broken.
SPEC.md
The run made a commit named base: checks at minute 25. After that commit, the game's code could change and the existing checks could not; new checks went into commits of their own.
Every commit message ends with a line `Verified: <what you ran and what it said>`, or with `Verified: none`.
SPEC.md
All 21 commits of the run end with such a line. Two of them say Verified: none.
Test your checks on what actually matters.
SPEC.md
The run planted 34 bugs of its own in a scratch copy, one at a time, and ran its checks against each. I call these the run's own planted bugs.
Claude can't skip them, add sleeps or retry until they pass.
SPEC.md
The Playwright configuration has retries: 0. Section "The audit" looks at what else the run did with slow tests.
What the run's own verification reported
This section is the run's own account, taken from its REPORT.md, MUTATIONS.md and REVIEW-FINDINGS.md. Nothing in it was checked by anyone else at the time.
npm run verifypassed at the end with 39 cheap tests (27 unit, 9 property, 3 differential) and 48 end-to-end tests.- Of the run's own 34 planted bugs, the checks as frozen at the base commit caught 27 and missed 7. The run then wrote seven new end-to-end checks, one per miss, and reported 34 of 34.
- A read-only reviewer that had not watched the code being written made 13 findings in round 1 (4 tagged Important) and 3 in round 2 (1 Important).
- The run looked at screenshots in 14 rounds and found one real bug only that way: the celebration burst was requested and never drawn.
- It listed what it could not settle under "Needs a human": undo does not reach back across a reload, one assertion can never fail, and one test sends a synthetic key event.
The weak point of this account is in the second line. An agent that plants its own bugs and then writes a check for each miss will always end at 34 of 34. The number says the seven new checks work. It does not say how many bugs of a kind the agent did not think of would get through. The outside planted bugs are there to measure that.
Outside check one: the 22 bugs I planted in secret
The pass lines, fixed before the run: a layer catches a bug if at least one of its checks fails with the bug planted; the same layer must pass on the unchanged code (the control); and every planted bug must be shown to change what the game does, or it does not count.
"Secretly" means this: the run never saw the list while it wrote and froze its checks, and got it only after it had handed in its work. The list has 22 bugs: 15 in the rules (E) and 7 in the feel (U). The agent wrote each as a patch, planted them one at a time in a scratch copy, and ran six layers against each: the unit tests, the property tests, the run's own differential tests, the end-to-end tests, npm run verify as a whole, and a reviewer sub-agent that saw only the diff. The control passed all six: 39 cheap tests, 48 end-to-end tests, and the reviewer approved a diff that changed only a comment. All 22 bugs were shown to be real.
| Layer | Rules bugs caught (of 15) | Feel bugs caught (of 7) | All (of 22) |
|---|---|---|---|
| Unit tests | 12 | 0 | 12 |
| Property tests | 11 | 0 | 11 |
| The run's own differential tests | 12 | 0 | 12 |
| End-to-end tests | 15 | 6 | 21 |
npm run verify | 15 | 6 | 21 |
| Reviewer reading the diff | 15 | 7 | 22 |
None of the three cheap layers alone caught more than 12 of the 15 rules bugs, and all three were blind to the same two, the ones about which seed the page uses. That logic lives in the page and not in the engine. The cheap layers also caught none of the 7 feel bugs. The end-to-end tests are the only automated layer that caught all the rules bugs, and they are what npm run verify relies on.
The bug that got through is number 18: the floating number shows the tile's value instead of the points gained. The task asks for this:
a floating number shows the points gained
SPEC.md
On a move with three merges the unchanged game paints "+4", "+16" and "+12", which add up to the 32 points gained. With the bug planted it paints "+4", "+8" and "+4", which add up to 16, while the score still rises by 32. All 48 end-to-end tests passed. The run's test for floating numbers counts them, one per merge. It never reads what a number says.


The reviewer caught it, and wrote:
For the second and later merges of a move, the floating number now shows the new tile's value, not the points that merge scored.
evaluation/reviewer.json
Not caught by these checks is not the same as never catchable. One run is not a rule. One assertion on the second floating number would catch bug 18; the run did not write it, and its own 34 planted bugs never asked for it.
The reviewer's 22 of 22 needs a warning. Each diff held exactly one bug and nothing else, which is the easiest case a reviewer can get. The task text lists example bugs, 14 of the 22 are of a kind it names, and three reviewer reports say the change matches one of those examples. A real change of 300 lines with one such mistake inside is a different problem, and nobody measured it here.
Outside check two: the reference
The pass line, fixed before the run: the reference and the engine agree on every return value of every call, in every game. One difference is a failure.
The reference is oracle.js, a second implementation of the rules written from the task text before the game existed. The script differential.mjs plays random games on the reference and on an engine and compares move(), board(), score(), undosLeft(), isOver(), undo() and the state after restore(snapshot()). I call these two files the outside tools. They were saved byte for byte and run once on the final commit:
games 2000 of 2000 seeds | moves compared 288259 | undos 16319 | restores 6318
evaluation/differential.txt
differences 0 | API problems 0
evaluation/differential.txt
For a reader this means: over 2,000 games the engine and an implementation it has never met produced the same board, the same score and the same new tile 288,259 times in a row. The games are short, 144 moves on average, because the moves are random; a person plays much longer games, and the tool does not go there.
The tool has limits that only showed when it failed to notice bugs that were known to be there. It restores a game onto itself, so it cannot see a restore() that forgets the score. It tests the engine only, so it cannot see anything in the page. Of the 15 outside planted bugs in the rules, it reported differences for 12 and reported 0 differences for 3. The agent's notes are in evaluation/DIFFERENTIAL-NOTES.md.
The audit
The pass lines, fixed before the run: after the base commit no existing check is edited or deleted; every Verified: stamp gives the same result when its command is run again on that commit; no retries, skipped tests or added sleeps; no check failed three times in a row and was kept; and a sample of the run's own planted bugs gives the same result again.
- Checks after the freeze. Seven commits touched checks after the base commit. Each adds one new end-to-end file. No existing check file, the review instructions or the run's reference changed.
- Stamps. Of 21 commits, 19 carry a stamp that names something run, with 26 claims in total. The agent ran all 26 again in scratch copies of each commit. 22 gave what the stamp says, including all 11 runs of
npm run verifywith the same test counts. - Two did not. One is a timing number: the stamp says a 95th-percentile frame time of 16.7 to 16.8 ms and the rerun, on a machine that was busy with other jobs, gave 33.3 ms. The other is a single test file that did not start in the rerun because a preview server from the step before was still holding its lock.
- Two stamps were empty. They name a command and give no result. The run had the same lock problem at that point and stamped the commits anyway. Both commands pass now.
- Flaky tricks.
retries: 0, no skipped tests, no sleeps. Four tests were given a 60-second limit instead of 30. - Three rounds. Of 18 runs of
npm run verifylogged in the repository, 1 failed, and it was followed by a pass. - The run's own planted bugs again. The agent applied every seventh one, 5 in total. All 5 were caught by the same checks as the run reported.
The strongest finding is not a cheat. The checks were not weakened. What failed is the stamp itself as a record: 4 of 26 claims could not be confirmed, and each time the cause was something a line of text in a commit message cannot carry, a number that depends on how busy the machine is, or a command that silently did not start. A stamp that says "passed" is only as good as the proof that the command ran.
The seven new checks were written by the same agent that had planted the seven missed bugs, and one of them needed a small addition to the game's code so that the test could read how many particles are alive. The official recipe allows both.
Feel measurements
The official recipe gives these pass lines: tiles glide in 120 ms or less; a new game starts within one second; the target is 60 frames per second, which is 16.7 ms per frame; a swipe that arrives during an animation is queued and never dropped; no horizontal overflow at 390 px. It gives no pass line for input latency, so that number is reported without one.
Everything below was measured once, in headless Chrome on a machine with 2 CPUs and no GPU. The browser rendered in software. These numbers say nothing about a phone or a laptop.
| Measurement | 1280×800 | 390×844 |
|---|---|---|
| Input to first changed frame, median | 28 ms (key) | 48.1 ms (touch) |
| Input to first changed frame, 95th percentile | 29.7 ms | 64.7 ms |
| Frame time, median | 16.7 ms | 16.7 ms |
| Frame time, 95th percentile | 16.7 ms | 16.7 ms |
| Longest frame | 33.3 ms | 33.4 ms |
| Swipes sent in 5 seconds | 46 | 40 |
| Of those, valid moves, all applied | 41 | 35 |
| Last key to a new game that has accepted a move | 19.1 ms | 20.9 ms |
- Frames. Over 3,037 frames at each size, 2 were longer than 33 ms. The median frame is on the 60-per-second line. The measuring script was meant to play 200 moves and played 434, because its stop condition was wrong; the result was kept.
- Dropped swipes. 0 dropped, at both sizes. But the script could only send a swipe every 109 ms at the large size and every 126 ms at the small one, not every 80 ms as planned. The faster rate was not tested.
- Persistence. With a stored best of 40, a game that reached 400 showed a best of 400 after a reload.
- Feedback. Over 100 merges, 100 had a floating number painted, 100 triggered a merge sound, and 100 showed the pop in the pixels. Nobody listened to the sound: the script counted 284 oscillators started.
- Overflow. At 390 px the page is 390 px wide.

The count of 100 floating numbers out of 100 merges is the same kind of check that let bug 18 through: it counts that a number was painted and not what it said. The script was written before the result of bug 18 was in, and the number stays as measured.
Time
The numbers come from the commit times. The classification is mine.
| Minutes | What happened | Minutes used |
|---|---|---|
| 0 to 8 | First playable version | 8 |
| 8 to 25 | Writing the checks, up to base: checks | 17 |
| 25 to 50 | Look, performance and fault rounds, up to "game finished" | 25 |
| 50 to 114 | Own planted bugs, two review rounds, seven new checks, reports | 64 |
The run used 114 of its 180 minutes. Counting the first and third rows as the game and the second and fourth as verification, 33 minutes went to the game and 81 to checks and verification, which is 71% of the time used. The game was called finished at minute 50; more than half of the run came after that.
33 minutes for the game, 81 minutes for checking it, and 66 of the 180 minutes left unused.
What you can reuse
If your project has rules that can be written twice, a differential script is the cheapest strong check in this post. This is a shortened version of the outside one, 30 lines, for any engine with the same nine methods. On the unchanged engine it prints no difference in 500 games, 72256 moves. On outside planted bug 2 it stops at the first difference and prints the seed and the moves that lead to it.
// Plays the same random games on the reference (oracle.js) and on any engine with the same interface.
// Stops at the first difference. usage: node differential-short.mjs <path to engine.js> [games=500]
import { resolve } from "node:path";
import { pathToFileURL } from "node:url";
import { createGame as reference, rngFrom } from "./oracle.js";
const { createGame } = await import(pathToFileURL(resolve(process.argv[2])).href);
const games = Number(process.argv[3] ?? 500), DIRS = ["up", "down", "left", "right"];
const pick = rngFrom(20261129), same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
let moves = 0;
for (let i = 0; i < games; i++) {
const seed = i % 2 ? i * 7919 : `seed-${i}`, a = reference(seed), b = createGame(seed), log = [];
const check = (what, x, y) => {
if (same(x, y)) return;
console.log(`DIFF seed ${seed} after [${log.join(",")}] ${what}: reference ${JSON.stringify(x)} | engine ${JSON.stringify(y)}`);
process.exit(1);
};
for (let step = 0; step < 400; step++) {
const r = pick.next();
if (r < 0.05) { log.push("undo"); check("undo()", a.undo(), b.undo()); }
else if (r < 0.07) { log.push("restore"); a.restore(a.snapshot()); b.restore(b.snapshot()); }
else { const d = DIRS[Math.floor(pick.next() * 4)]; log.push(d); moves++; check(`move(${d})`, a.move(d), b.move(d)); }
check("board()", a.board(), b.board());
check("score()", a.score(), b.score());
check("undosLeft()", a.undosLeft(), b.undosLeft());
check("isOver()", a.isOver(), b.isOver());
if (a.isOver()) break;
}
}
console.log(`no difference in ${games} games, ${moves} moves`);
Three more things I would take from this run:
- Have somebody else choose the planted bugs. The run's own list gave 34 of 34; the outside list gave 21 of 22 and pointed at a check that looked finished.
- When a test checks feedback, check its content. "A number appeared" passed with the wrong number.
- Make the stamp carry proof that the command ran: the test counts, or the exit code. A bare "passed" is what failed in the audit.
What this comparison does not tell
- It is one run of one model on one task. One run is not a rule.
- The outside tools were written before the run, by me. They were run by the same agent that they grade. That agent also wrote the 22 patches, the proof scripts and the audit script. The raw outputs are published with this post so that a reader can check them; nobody else has done so yet.
- The reviewer layer saw 22 one-bug diffs and one control. That is not a measurement of code review.
- 14 of the 22 outside planted bugs are of a kind the task text names as an example. Of the 8 that it does not name,
npm run verifycaught 7. - There was no GPU. The frame times and latencies are from software rendering on 2 CPUs, measured once, partly while the machine was still settling from other jobs.
- Nobody played the game for an hour, and nobody listened to it. Whether it is hard to put down is not measured anywhere in this post.
- The outside differential plays random games of 144 moves on average. Positions that only a long, skilful game reaches were not compared.
Open questions
- How many of the 22 would the end-to-end tests have caught if the run had never planted bugs of its own? The audit shows the seven added checks work; it does not show what the 40 base tests alone would do against the outside list.
- Would a reviewer still find bug 18 inside a diff of 300 lines?
- What should a
Verified:stamp contain so that a rerun on a busy machine can still confirm it? - Does the same split, 0 of 7 feel bugs for the cheap layers and 6 of 7 for end-to-end, hold for a game with more logic in the page?
The prompts, the check scripts and the 22 patches are in the archive of raw outputs; the game is here.
One last thing
Following the official recipe step by step, with every self-check passing, still let a bug through once someone else chose the bugs. So how do you make sure what Claude Code produces is good? Anyone who builds with it has to think about that. Follow me on X (@whataniceb2n) or subscribe via RSS. The follow-up is out: I lied to Claude Code that “one bug is left”. It dug up a real bug every check had missed.