// TOM'S HARDWARE US — HARDWARE & GADGET
Dev used AI agents and more than 500 billion tokens to rebuild Call of Duty: Modern Warfare 2's source code
The agents originally tried to cheat the developer’s check.
When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works.
Developer Maurice Heumann details in his blog how AI agents were able to decompile Call of Duty: Modern Warfare 2 (2009), which the post calls only “a popular first-person shooter,” in an effort to rebuild its source code in C++, taking three months and over 500 billion tokens. The agents originally attempted to cheat a byte-for-byte check added after the first month of code ran, but it was “semantically wrong,” and now 99% of the game’s functions are present, with 83% matching the original.
Heumann’s goal since the beginning has been to produce an “accurate, stable and feature-complete recreation,” and he wrote on X less than two weeks ago that the game was fully playable. By his estimate, the project consumed 600–700 billion tokens. In another X post, he said he doesn’t pay for his own tokens but put the cost at about €1,200 with subscriptions or $200,000–$250,000 with API tokens.
The difficulty turned out to be not in producing the code but verifying it was correct, forcing the developer to create a check and to make sure the agents couldn’t game it. The other challenge, as he put it, was that “corporate America was here to ruin our fun.” Two earlier blog posts on the project have since been removed, and the video in his Sept. 30 X post was disabled after a report by the copyright owner. No comment from Activision is currently on record.
MW2 decompilation is nearing its end.
With currently 17 agents working in parallel, we're making progress at an incredible pace.
The game is fully playable now and almost all visible bugs are gone. Only a few are left.
I even managed to get my first nuke ☢️😂 https://t.co/vgfQdP93GtSeptember 30, 2026
The method includes pointing a fleet of agents, using Anthropic’s Claude and OpenAI’s Codex, at the original 2009 PC game. Heumann started with a Claude Max (20x) plan, then added Codex Pro and used both simultaneously. These are flat-rate plans and do not use per-token API billing. “Most of the time,” the developer relied on Sonnet 5, although Opus 5.5 and OpenAI’s Luna, Sol, and Terra were “also used a lot.” For harnesses, he relied mostly on the Claude Code and Codex CLIs.
The agents read the code through IDA using Hex-Rays’ ida-mcp server. The work started with four agents, three workers and a reviewer; by Sept. 30, he wrote on X, it had “17 agents working in parallel.” Keeping all of this straight meant having one GitHub issue per translation unit, and having all agents and humans share a single Discord channel with GitHub webhook CI posts. The developer also tuned the auto-compaction threshold, from the default 90% of the context window maximum to 42% to help clear finished functions out of memory. Agents also had a tendency to drift, so an hourly cron job had them reread instructions.
The agents’ first month of code was extremely readable but “semantically wrong” for multiple reasons: wrong function signatures, types and struct layout issues, and logic that was invented or removed. The agents also made unneeded architectural changes, such as turning a config-variable lookup into one that was “orders of magnitude more expensive.”
The reviewer agent failed to stop this as there were no objective acceptance criteria, and the workers’ comments justifying their changes “effectively acted as unintentional prompt injection,” Heumann says. The team eventually stripped all comments from the source, which “helped a lot,” he wrote on X. An attempt to salvage the first four weeks of code took more time than starting from scratch would have.