GitHub Rebuilt Copilot's Runtime in Rust Using Copilot — 800,000 Lines, One Engineer
GitHub's September 16 engineering post details rewriting the Copilot agent runtime from TypeScript to over 800,000 lines of Rust, mostly written by Copilot's own agents over 14.5 weeks. Result: a 15.9x speedup and 11x less memory for about $120,000 in tokens.
The strongest evidence for coding agents this week didn’t come from a benchmark — it came from a migration. On September 16, GitHub published a detailed engineering account of rewriting the shared runtime behind Copilot CLI, the Copilot app, and the Copilot SDK from TypeScript on Node.js into more than 800,000 lines of production Rust. The tool that did most of the work was Copilot itself.
The numbers are unusually concrete for this kind of story. The final result: 832,378 lines of production Rust plus 468,689 lines of unit tests, produced across 128 merged pull requests over roughly 14.5 weeks (May 12 to August 21), shipped incrementally across 135 releases rather than in one big cutover. One primary human engineer did the work, with Copilot-spawned subagents handling 61% of the roughly 1.13 million tool calls the project required. The unsafe code — 158 blocks across 36 files, concentrated at FFI, OS, and SQLite boundaries — has zero known regressions traced to it.
What broke, and what it cost
GitHub doesn’t pretend the agents got it right the first time: dozens of regressions from type ambiguities, timezone and environment handling, and lifecycle bugs, all fixed by September 14. The Register pegged the token spend at about $120,000 on top of the engineer’s time — a rounding error against the engineering cost of a rewrite this size. GitHub’s own framing: a project that would have taken a whole team of developers a year or two before agents was completed primarily by a single developer in a few months, while the rest of the team kept expanding the runtime’s capabilities.
And the rewrite paid for itself in performance. One benchmark measuring 1,000 one-turn session lifecycles with a shared client and 100 concurrent pipelines went from 7.55 lifecycles per second in TypeScript to 120 per second in Rust — a 15.9x speedup. A 10-client batch of agents dropped from 1,383 MB of memory to 126 MB, and the Rust runtime stays in-process instead of spawning external background processes for completions. GitHub’s thesis is that agentic coding assistants have changed the cost calculus for large-scale language migrations — work that “wasn’t affordable before agents” now is. This is the first migration at this scale with real numbers attached: cache hit rates, regression counts, unsafe-block counts, and the dollar cost of the tokens. That’s the part worth bookmarking.