Source: 500+ Billion Tokens Later: Letting AI Agents Decompile A First-Person Shooter, by Maurice Heumann
Maurice Heumann’s team had agents rebuild a first-person shooter as C++. The code read well and was wrong, and a reviewer agent approved it. A per-function PASS/FAIL check against the original binary fixed that.
A reviewer can approve code that reads clean and still does the wrong thing. That keeps happening while nobody has written down what correct means.
Three worker agents decompiled and committed; a fourth agent reviewed their commits. Progress tracking ran through one GitHub issue per translation unit, and the agents talked in a shared Discord channel where a webhook posted CI failures.
The steady progress hid the quality. Agents used wrong function signatures, types and struct layouts, and invented or removed logic. Configuration values the game read as plain globals had become hash table lookups, orders of magnitude more expensive.
The reviewer did not catch it. There were no objective acceptance criteria, and the workers’ comments explaining each deviation worked like unintentional prompt injection: the reviewer accepted their reasons instead of checking against the original.
The fix was a check that answers PASS or FAIL for each function. The agent figures out the rest.
Reconstructed C++ is compiled to an OBJ file.
A script pulls each function’s bytes out of both.
References to other functions and data depend on where targets land, so the relocation bytes are skipped and checked as the same symbol with the same offset. The same check runs for data and types.
Call and data references are compared as symbol + offset, not raw bytes.
| Cost | Gain |
|---|---|
| Register choice, inlining and calling conventions are hard to reproduce | A matching function has identical semantics, original bugs included |
| Decompiling a function takes much longer | The reviewer agent was no longer needed |
| Some functions never match (non-determinism, linker COMDAT folding) | Cheaper models could do the work: 14 Luna and 2 Opus 5.5 agents at the end |
After almost two more months, 99% of the game’s functions were present and 83% were byte exact. The game runs with no noticeable bugs. The author estimates 600-700 billion tokens in total; the code stays private.
500+ Billion Tokens Later: Letting AI Agents Decompile A First-Person Shooter by Maurice Heumann, the source for every fact on this page.
A companion Short covers the same story; its link will be added here.
Sources: every number is from the source post (sections “The First Month”, “Final State”, “Final Words”).