
A Coding Agent Spent 19 Days and $2,600 Rewriting a 61,000-Line Codebase. Here's What It Did Right.
Agentic AIAn AI agent spent 19 consecutive days rewriting a 61,461-line codebase. It cost $2,600. A human team would have needed 2–17 weeks and multiple engineers. The question isn’t whether that’s a lot of money — it’s whether the agent finished the job.
What Happened
MirrorCode, an agentic coding platform, published results from a study testing current AI models on real programming tasks — not synthetic benchmarks, but actual software projects at production scale. Four codebases were used: choose (931 lines), cal (984 lines), gotree (16,905 lines), and Pkl (61,461 lines, the HashiCorp configuration language interpreter).
Claude Opus 4.7 achieved a 56% solve rate across all tasks. On the largest codebases — gotree and Pkl — the model’s performance relative to other AI systems widened significantly. The gotree reimplementation (16,905 lines of Go) completed in approximately 14 hours at a cost of $251. The Pkl reimplementation ran for 19 days at $2,600 — the most expensive and longest single task in the study.
Human baselines for the same tasks ranged from 2 weeks (for gotree-scale projects) to 17 weeks (for Pkl-scale rewrites) with a team of engineers. The agent worked alone, continuously, without standups or PRs.
Why It Matters
The finding that inverts expectations: AI coding agents scale better on larger tasks, not smaller ones. On small codebases (900–1,000 lines), AI performance relative to human developers is modest. At 16,000+ lines, the gap widens — the agent doesn’t get tired, doesn’t context-switch, and doesn’t need to re-read the codebase each morning.
This contradicts the conventional framing of AI coding tools as autocomplete engines good for boilerplate and syntax. The MirrorCode data suggests that sustained, coherent reasoning across a large codebase over an extended session is a distinct capability — one where current frontier models perform meaningfully better than the “AI generates a function, human reviews it” loop that most teams are currently running.
The economics at scale also reframe the calculus. $2,600 for a 61,000-line reimplementation sounds expensive in isolation. Compared to 17 weeks of engineering salary on a niche project (Pkl is a specialized configuration language with a small potential team), it is an order of magnitude cheaper — and faster.
What This Means for Builders
Three implications for teams building with or alongside AI coding agents in 2026:
Task sizing matters more than model selection. The study suggests that chunking work into small, isolated tasks to “stay in context” may be actively counterproductive for agent performance at the large-codebase tier. Agents that can maintain long-horizon plans — Claude’s 19-day Pkl run is the clearest example — do better when not artificially scoped down.
Cost modeling needs a new baseline. The $2,600 / 19-day number will age fast as models become cheaper and faster. The structural finding — that per-token cost at large-task scale is more favorable than per-hour engineering cost — is likely durable. Teams pricing out AI-assisted rewrites should model full-task cost, not per-session cost.
Evaluation quality becomes the bottleneck. A 56% solve rate is meaningful, but what does “solved” mean at 61,000 lines? MirrorCode used functional correctness as the primary metric. As agent task sizes grow, the quality of the evaluation harness becomes as important as the model’s raw performance. Teams without rigorous test coverage will struggle to verify whether large-scale agent output is production-ready.
The So What
The MirrorCode study doesn’t show that AI replaces engineering teams — a 56% solve rate still means 44% of tasks require human intervention or fail. What it shows is that the ceiling for agentic programming is higher than most teams are currently planning for. If your AI coding strategy is “autocomplete and PR review,” you’re not using the most valuable part of what these systems can now do. The 19-day, $2,600 Pkl run is an extreme example, but the direction it points — long-horizon, large-codebase, unsupervised execution — is where the frontier is moving.
Source: MirrorCode
Content created with AI assistance and reviewed for accuracy.
Join the conversation
Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.
Join Stack Insiders →