GitHub rewrote Copilot runtime in 800K lines of Rust, mostly written by AI agents
GitHub Blog AI/ML · rss · 2026-09-17
GitHub's engineering blog details how the Copilot agent runtime — the shared engine behind Copilot CLI, the Copilot app, VS Code, Excel, Word and more — was fully rewritten from TypeScript/Node.js into 800,000+ lines of production Rust, with AI agents writing most of the code across 128 merged PRs.
Why the rewrite
- The old SDK spawned the CLI as a subprocess talking JSON-RPC, forcing every consumer to ship a Node/V8 runtime (100 MB minimum working set), pushing all calls across process boundaries, and making Node crashes take down sessions.
- The rewrite targets an embeddable, TUI-free Rust library with a C ABI, integrated in-process by all six SDK languages (C#, TypeScript, Python, Rust, Go, Java).
Outcomes and trade-offs
- A project that would have taken a team 1–2 years was done primarily by one developer in a few months, shipped incrementally with regressions caught quickly; performance improved by orders of magnitude.
- Rust's explicit lifetimes and shared-state handling caused lifecycle regressions along the way; TUI/runtime layering is still being completed.
- The authors stress this isn't a claim every large TypeScript codebase should move to Rust — the choice was driven by embedding, startup/memory overhead, and predictable resource use.
More from coding & agent
- Rene launches: an iMessage agent that chases invoices and collects cash for you — EXM7777 · 2026-09-17
- Solo dev builds STARBATTLE in 7 weeks with all code, art and audio AI-generated in native C++ — AIandDesign · 2026-09-17
- Dev demo: grouping tabs, files and terminals by project with swipe switching — nateparrott · 2026-09-17
- Google AI Studio Tips: Using generate_image to Make Apps Stop Feeling Vibecoded — m4rkmc · 2026-09-17
- Tencent open-sources TeamAI-CLI after 6 months of internal use to turn team knowledge into one git repo for agents — Roger_M_Taylor · 2026-09-17
- RoMem uses continuous phase rotation to expire stale agent memories, 2-3x better temporal reasoning — Roger_M_Taylor · 2026-09-17