Microsoft's AI agents rewrite the GitHub Copilot runtime in Rust for $120K
A 430,000-line TypeScript codebase became 800,000 lines of Rust over 14.5 weeks, mostly done by AI coding agents.
What to know
- Microsoft used AI agents to convert the Copilot runtime from 430,000 lines of TypeScript to 800,000 lines of Rust in 14.5 weeks for about $120,000 in token costs.
- Benchmarks cited by Microsoft show a 15.9x throughput speedup and roughly 11x lower memory use in the Rust version.
- The project required human oversight to fix a few dozen regressions, and Microsoft says the structural optimization of the runtime is still to come.
- Online commenters have questioned whether the reported token-cost figure is realistic given estimated compute costs for a project of this scale.
“The popular image of AI spewing code is almost backwards; at this scale, the work looked much more like iterative investigation, inspecting the current state, forming a hypothesis, making a targeted change, rinsing and repeating.”
Stephen Toub, Microsoft Distinguished Engineer · The Register ↗ · Sep 17
Stephen Toub Microsoft Distinguished EngineerMicrosoft Company behind GitHub CopilotGitHub Copilot Product/runtime being ported
How it unfolded 1 development · click the chart to see its coverage articlespostscomments
-
1
Commenters question feasibility of the $120K token-cost figure
On Reddit, a commenter estimates the compute costs implied by an Opus-class model on a 400,000-line-scale project would require roughly 60 billion tokens, questioning whether the reported $120,000 figure is consistent with known hardware and operational cost estimates.
“Hardware mortization for an Opus class model is around 1$ per mil tokens alone, then you get operational costs in the same range... they would allegedly spend around 60b tokens on that project? Would be a bit rough for a 400kloc project…”
— Minimonium -
Oh boy. No. > Linux, and Unix, and iOS (which is lLinux under the hood) are substantially harder to install on diverse hardware. Just so you know, none of Apple’s operating system have ever been based on Linux, ever, in the entire history of the company. The kernel, XNU, is based on Mach and FreeBSD. > The *nix distros can’t even agree on a single…
2 more of the top 3 · 16 posts in this stretch
-
> The original TypeScript implementation completed 7.55 of those lifecycles per second, while Rust running in-process managed 120 per second - representing a 15.9x speedup on that particular workload.Does this impresses/surprises anyone? Two folds: 1) I believe the most optimized JavaScript code could near the performance of this phase 1 port…
-
V
good news for everyone running copilot for any reason: https://www. theregister.com/devops/2026/09 /18/microsoft-agentically-ports-copilot-runtime-to-rust-for-120k/5297549 it's vibecoded now so you can abandon it guilt free
-
-
background
Benchmarks show 15.9x speedup and lower memory use in Rust — A benchmark of 1,000 one-turn session lifecycles found the Rust runtime completed 120 per second versus 7.55 for TypeScript, and a 10-client agent batch used 126 MB in Rust versus 1,383 MB in TypeScript, though managers had to fix a few dozen regressions introduced by the AI-driven port.
-
background
Microsoft details AI-driven Rust port of Copilot runtime — Microsoft Distinguished Engineer Stephen Toub publishes an account of using AI agents to convert 430,000 lines of TypeScript into 800,000 lines of production Rust for the runtime underlying GitHub Copilot, VS Code, Visual Studio, Excel, Outlook and other products; The Register reports the migration cost about $120,000 in token usage and three weeks of developer time across 135+ releases over 14.5 weeks.
Also covered reported alongside — the timeline has no entry for these yet
-
first by HN Frontpage, 6d ago · also The Register
What people are saying 11 voices from 1 site · best of 16 · verbatim
- Sep 20
-
I'm slowing moving everything to kubuntu and have for some time has it in my non work lifeReally nothing works anymore as great a product full fat visual studio and windows 7 was I don't have time to deal with your bugs
-
That just sounds like normal Microsoft software to me, since way before vibe coding.
-
they ported their coding harness, something known for being simply an extensible http and subprocess wrapper, into a monolithic blob. They took their bloated and slow coding harness, and turned into an un-maintanable blob.
-
Can they port their m365 chat UI too?Don't know what tech stack it is but I'm guessing electron judging by how buggy and slow it is
-
> file explorer display the "loading" icon infinitely on some directoriesNautilus had that feature 10 years ago, good to hear they've reached parity.
-
I wrote to the post of Andrea (a dev from the Copilot team) about their 800K LoC: 128 PRs, shipped incrementally. Existing end-to-end tests ran against the new code at every step.Total: ~1,301,378 lines of Rust.Production: 832,378 Unit tests: ~469,000 Combined: ~1.30 million linesOn top of the 832K LoC are mostly tests she answered:> Yeap, 832,378…
-
The line between vibe coding and just coding has now moved. Vibe coding is specifically when the output is not understood by the prompter. Even in the back in the days of the earlier models i used the models to do my basic typing because it was easier than me typing it out…
-
> agents converted 430,000 lines of TypeScript into 800,000 lines of production RustThe +400k new lines were probably code comments the agents added to everything
-
Still hoping for a company to agentically port the python ecosystem to GIL-free python.
-
They don't have to tell us they are vibe coding everything.- there are now ridiculous vibe coded localisation in VS2026- task manager started to not report cpu usage correctly recently (the number becomes stalled)- file explorer display the "loading" icon infinitely on some directories- and many other things!
-
One of the thorniest conversions was the session.ts file, which was over 30,000 lines of TypeScript that touched all aspects of the runtime. This can’t be real. Single file with 30K lines? Which human being is working on it and how much RAM does it take for a code editor to load that with full symbol tree? I am genuinely curious. Is this common? I…