GitHub Rewrote Its Copilot Runtime in 800K Lines of Rust Using Copilot
GitHub's official blog published a long-form post by Stephen Toub detailing how the team rewrote the Copilot agent runtime—the shared foundation behind Copilot CLI, the Copilot app, and the Copilot SDK—from Node.js/TypeScript into 800K+ lines of production Rust in roughly 14 weeks, led by one person with most code AI-generated across 128 PRs, cutting memory usage by 91%. It is widely seen as a landmark case of AI-assisted large-scale code migration.
Confirmed
- Stephen Toub detailed the full migration; Martin Woodward (Microsoft/GitHub) expanded on it in a tweet thread, confirming the key numbers: 91% memory reduction and 128 PRs. Accounts like @PaulShellDev, @vykthur, @DanWahlin, and @mariorod1 relayed the blog, confirming 800K lines, 14 weeks, and one lead engineer.
- Woodward explained the harness's origins: it began as the web coding agent powering Copilot's web version and code review, was reused by Copilot CLI with many improvements, and is now extending across the entire Copilot product line.
- On motivation, Woodward clarified the problem was not TypeScript itself but a CLI-designed architecture being used as a shared runtime—every SDK client spun up another Node/V8 process, fine for shipping quickly but unsustainable at heavy concurrent-session scale.
Why it matters
- Authors like @vykthur note the case shows AI completing in weeks what would otherwise take person-years, offering a reference for legacy language migrations.
- Woodward stressed that "migrating to Rust is the least interesting part—how it was migrated is what matters": methodology and process (stepwise verification, behavioral consistency) matter more than the language choice.
2026-09-17 ~ 2026-09-18 · 10 related posts
Primary sources
- GitHub rewrote the Copilot agent runtime into 800k lines of Rust, mostly written by AI agents — PaulShellDev · 2026-09-17
- [source] GitHub Copilot ported its agent runtime from TypeScript to Rust: 800K lines, 14 weeks — vykthur · 2026-09-17
- [source] GitHub rewrote Copilot SDK from TypeScript to Rust, cutting memory use ~91% — martinwoodward · 2026-09-17
- The Rust rewrite is the least interesting part, says Microsoft dev about Copilot SDK — martinwoodward · 2026-09-17
- How the Copilot coding agent harness spread from web to every Copilot surface — martinwoodward · 2026-09-17
- Microsoft moves Copilot agent runtime to Rust for fast startup and low memory — martinwoodward · 2026-09-17
- It wasn't TypeScript's fault: CLI architecture spawned a Node process per SDK client — martinwoodward · 2026-09-17
- GitHub rewrote Copilot's agent runtime into 800K lines of Rust, mostly written by AI agents — martinwoodward · 2026-09-17