Agents Refactor 300K Lines in Three Weeks, and Practitioners Ask What It Proves
CodeScene 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. The agents built a playbook of codebase-specific recipes along the way. Practitioners have questioned the scope, the metric, and how much of the result depends on the harness. By Steef-Jan Wiggers
Coding agents successfully refactored a 300,000-line C codebase spanning three weeks, requiring only about $4,000. The project, involving CodeScene's CodeHealth MCP Server and correctness checks via replay-trace harness, generated 2,903 commits across 726 files, improving the codebase's health score from 5.6 to 10.0. The agents developed 22 refactoring recipes and 82 supporting notes, implementing techniques like Extract Function and Shared Index Range.
Practitioners on LinkedIn expressed mixed reactions, with some viewing the results as significant and others questioning the scope, methodology, and real-world applicability. The replay-trace harness functioned due to the game's deterministic frame-by-frame replay capability, a feature not typically present in legacy systems. The study aims to explore further by comparing AI-improved versions with human-improved ones, measuring the impact on defects and token waste.
Written by urgent.news from InfoQ's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.