GitHub Migrates Copilot Runtime to Rust
GitHub rewrote the Copilot agent runtime from TypeScript to Rust, improving performance and simplifying integration across its SDKs.
Original source published: September 17, 2026
GitHub has completed a migration of the Copilot agent runtime—used by the Copilot CLI, app, and SDK—from a TypeScript/Node.js implementation to more than 800,000 lines of production Rust. The rewrite was driven largely by AI agents, spanned 128 pull requests, and was delivered incrementally, allowing a single developer to finish the core work in a few months while the broader team continued expanding runtime capabilities.
The move addresses several constraints of the original stack, including high startup latency, memory overhead from V8, and the need for out‑of‑process communication when the SDK embeds the runtime. By targeting a minimal‑dependency, in‑process Rust library with a C ABI, the new runtime can be embedded by all six Copilot SDK languages and offers a more predictable resource profile. The port was performed in‑place using an atomic component‑by‑component replacement, avoiding any work stoppage on the main branch.