GitHub rewrote Copilot's entire runtime in Rust using AI agents — 800,000 lines, 14.5 weeks, $120,000
GitHub disclosed on 16 September 2026 that it rewrote the agent runtime powering GitHub Copilot from TypeScript into over 800,000 lines of production Rust, mostly AI-agent-generated across 128 continuously merged pull requests, completed in roughly 14.5 weeks for about $120,000 in model usage — a live case study in what large-scale AI-assisted development actually costs and looks like.
20 September 2026
On 16 September 2026, GitHub disclosed that it had rewritten the agent runtime behind GitHub Copilot — previously TypeScript running on Node.js and V8 — into more than 800,000 lines of production Rust. Most of that code was produced with AI agent assistance, spread across 128 pull requests that were continuously merged into the live codebase rather than developed as one giant replacement branch that ships all at once. The whole migration took roughly 14.5 weeks and consumed about 136.3 billion tokens, at a model-usage cost of around $120,000.
That’s a genuinely useful data point, because it’s not a demo or a benchmark — it’s a shipped, load-bearing rewrite of the runtime for one of the most widely used AI coding products on the market, done by the company that makes it, with the receipts published.
Why the numbers matter more than the headline
A full-language migration of a production system this size, done conventionally, is normally scoped in engineer-years, not weeks, and priced accordingly. $120,000 in model spend against that baseline is a striking unit-economics story — but it’s not the whole picture. The continuous-merge approach (128 incremental PRs against one big-bang rewrite) is doing real work here too: it’s a structural choice that keeps a rewrite reviewable and revertible in pieces, which is exactly the discipline that makes large AI-assisted changes safe to ship rather than just fast to generate. The cost figure describes the generation; it doesn’t describe the review, testing and integration discipline that had to sit around it — and GitHub had that discipline available in-house as the tool’s own maintainer.
The comparison worth drawing
GitHub isn’t the only company running its own agents against its own production code this way — Anthropic has run comparable internal Rust migrations with a different playbook, and the pattern of “AI-agent-heavy rewrite, incrementally merged, cost disclosed” is becoming a recognisable genre of engineering case study rather than a one-off. That’s worth watching: as more vendors publish real cost and timeline numbers for agent-driven migrations, it gets easier to sanity-check what a comparable engagement should actually cost, rather than pricing purely off vendor marketing claims about AI coding speed.
So what
This is the clearest evidence yet that AI-assisted development can compress large, structural engineering work — language migrations, framework upgrades, legacy modernisation — that used to be too expensive to justify. The catch is the same one it always is: the compression comes from pairing capable models with an incremental process and real review, not from pointing an agent at a codebase and walking away. If you’re sitting on a legacy migration or a modernisation project you’ve been quoted as a multi-year effort, it’s worth a second look at what an AI-assisted approach changes. See our AI-assisted development page, or get in touch to talk through the specifics of your codebase.