The 1.3-Million-Line Restart

On October 7 a repo called pingdotgg/ts-rust appeared. It is a Rust port of the TypeScript 7 compiler, type checker, and language server, and the README tells its history in three acts. Act one: over “multiple months,” GPT-5.6 Sol and then GPT-6 Astra, running in Codex, wrote “over 1.3m lines of Rust” and used “over $400,000 in API priced tokens.” Compatibility “never got past like 84%.” The README doesn’t blame any one bug. It describes a plateau where each extra week bought less. Act two: the author pointed Opus 5.5 in Claude Code at the same repo and “assumed it kept using the code the Codex models wrote. I was wrong. Opus 5.5 started from scratch.” Nobody told it to throw the code away. It looked at 1.3 million lines of sunk work and decided not to build on them. That was the most consequential decision in the project, and the human didn’t notice it had been made. Act three: a working v0 in 10 hours. After two weeks and “~$24,047 of API spend,” the port passes “all 181,711 ported Go tests” and is 11.4× faster than tsc 6 and 1.61× faster than tsc 7 (geometric mean). Known defects: memory grows about 20 MiB per 1,000 editor edits, and some monorepo edge cases behave differently from tsc.

The Hacker News thread is useful because it takes the headline apart. TypeScript team member Daniel Rosenwasser called the port impressive and noted that “3 of these ports have popped up in the last week,” which makes it less of a one-off. Commenters pointed out that the $400k is a list-price estimate of tokens that probably came out of stacked subscriptions, with one guessing the real cash cost was under $500. The $24k is also labelled “API spend,” so both sides of the 17× ratio are probably notional. Others asked whether 181,711 human-written tests leave gaps exactly where the original authors trusted common sense. The second attempt also had advantages the first didn’t: a known target, a test oracle already wired up, and a failed predecessor in the same directory. So this isn’t a controlled comparison of two models. It is one trajectory with one turning point.

That turning point is worth taking seriously anyway, because it shows something the usual instruments can’t. Compare two other reports from the same 48 hours. LegalOn cut its Codex spend by 65% by sending each task to the cheapest GPT-6 variant that could handle it. That kind of per-call routing works because each call stands alone. In Quesma’s Invisible Cities one-shot, GPT-6 Astra finished in 53 minutes for about $10. Opus 5.5 took 1h25m and about $74 across six parallel subagents, and the author still preferred its output. Cost per token, cost per task, and cost per finished project rank these models differently. In ts-rust the option that looked cheaper step by step ran up the bigger bill, because a plateaued trajectory keeps charging without converging. What ended the plateau was one strategic act, abandoning the sunk work, and a per-request router never sees that. Neither does a one-turn pairwise vote.

If you choose models for month-long agent builds, the data that matters is trajectory telemetry. Where do the test-pass curves flatten? How often does a model restart or re-architect from scratch, and when it does, does the restart pay off? An evaluation built for this kind of work would log plateau-and-restart events and score models on cost per finished outcome, with a test suite as referee. That is harder to run than a leaderboard. But on long projects the result can turn on a single decision, and that decision happens in the middle of the run, where today’s benchmarks don’t look.