Skip to content
AI Learning Ground Start learning

News ·

500B Tokens Later: Letting AI Agents Decompile a First-Person Shooter

A team spent three months and roughly 500B tokens running autonomous AI agents to decompile a popular first-person shooter into readable, compiling C++, reaching about 80% coverage, but found the output was often semantically wrong despite looking clean.

500B Tokens Later: Letting AI Agents Decompile a First-Person Shooter
Image: Hacker News

Over three months, the author worked with community collaborators to decompile a popular first-person shooter into C++ using autonomous AI agents. The aim went beyond a proof of concept: they wanted an accurate, stable, feature-complete recreation with readable source that compiles. The game itself is not named, as earlier posts about the project were removed after legal pressure the author attributes to corporate America. Agents decompiled about 80% of the game; it launched, showed the main menu, and could load maps.

The team ran Claude Code CLI (starting with Claude Max 20x) and Codex CLI (Codex Pro) in parallel, mostly using Sonnet 5 alongside Opus 5.5, Luna, Sol and Terra. Three worker agents decompiled and committed code while a reviewer agent passively coordinated and flagged bugs. Each translation unit had its own GitHub issue for tracking, agents communicated through a shared Discord channel open to both agent-to-agent and human-to-agent messages, and a GitHub webhook posted CI failures into that channel. For reverse engineering, agents used Hex-Rays' official ida-mcp, described as stable and headless. The team cut token consumption by lowering the compaction threshold from 90% context fill to 42%, since decompiled function details quickly become irrelevant junk. To counter agent drift, idling, abandoned half-finished functions, and prematurely closed issues, they wrote a detailed instruction document and used an hourly cron job to inject reminders for agents to reread it.

The key lesson is about quality: despite visible progress and very readable code, the decompilation was semantically wrong. Agents invented or dropped logic, used wrong signatures, types and struct layouts, and made costly architectural changes, such as replacing the game's direct global-variable config access with hash table lookups orders of magnitude more expensive. The reviewer caught bugs but accepted architectural deviations, especially when worker agents justified them in commit or code comments, because the team never defined objective correctness criteria. For anyone building with AI, the takeaway is that orchestration infrastructure, compaction tuning, and instruction refreshes can sustain long autonomous runs, but without explicit acceptance criteria and a trusted ground truth to check against, plausible-looking output can hide deep semantic errors.

References

Read the full story at Hacker News ↗Like, save or discuss on Buzz

#community #signals