OossaAI is evolving fast. We explain it simply.

AI agents refactor 300K lines of game code in three weeks for $4K

CodeScene used AI agents and its CodeHealth MCP server to clean up a 300,000‑line C codebase of Street Fighter III in three weeks, at a token cost of about $4,000.

Oossa1 min read

AI agents refactor 300K lines of game code in three weeks for $4K
Photo by Compagnons on Unsplash

CodeScene published a case study showing that AI agents can refactor a large legacy codebase quickly and cheaply. Over three weeks, the agents rewrote a 300,000‑line C version of Street Fighter III: 3rd Strike, producing 2,903 commits across 726 files. The work cost roughly $4,000 in AI token usage – about half a month’s developer salary – and moved the Code Health score from 5.6 to a perfect 10.0.

How the AI did it

The team used the CodeHealth MCP Server as a deterministic quality signal. The server gave each change a score, letting the agents know whether a refactoring helped or hurt the code’s health. A replay‑trace harness compared the game’s frame‑by‑frame state before and after each change, ensuring functional correctness. The agents learned a playbook of 22 refactoring recipes, including familiar patterns like Extract Function and novel ones such as Shared Index Range for loops that differ only in start/end values.

What practitioners think

Reactions on LinkedIn split along two lines. Some, like CTO Mats Iremark, called the result “almost like cheating” and highlighted the huge productivity gain. Others, such as tech lead Konrad Otrębski, questioned the scope, noting the work was done on an open‑source game rather than a production system and asking whether the changes were merged in a single massive pull request or many smaller ones. CodeScene’s engineers said the changes were merged through 54 pull requests on a fork.

Why it matters

For a typical developer, this shows that AI can automate large‑scale clean‑up tasks that would normally take months, potentially lowering the cost and risk of working with legacy code. However, the result depends on having a reliable correctness check, which many real‑world projects lack.

Was this article useful?
Share

Read next

Oossa · Newsletter

The week in AI, explained

Every Monday: the stories worth knowing, in plain language. Free, no spam.

Sources & references

#SourceOutletDateKey takeaway
1Agents Refactor 300K Lines in Three Weeks, and Practitioners Ask What It Proves ↗InfoQSep 30, 2026CodeScene has published a case study in which coding agents refactored 300,000 lines of C over three weeks for roughly $4,000 in tokens, verified by a frame-by-frame replay harness.

1 sources

Last updated: ·Markdown·llms.txt