GitHub has moved the runtime behind Copilot CLI, the Copilot app and Copilot SDK from TypeScript and Node.js to Rust. The rewrite replaced more than 800,000 lines of production code in about 14.5 weeks while the team continued shipping releases.

Rather than building a separate replacement and switching all at once, GitHub converted individual components and connected them to the remaining TypeScript through N-API. Existing end-to-end tests could therefore exercise each new Rust section. The temporary compatibility layer eventually grew to 2,019 exports and 3,356 TypeScript call sites before removal.

AI agents generated most of the implementation, but compilation was only the first check. Automated tests and human reviewers caught differences involving state, object lifetimes, retries, cancellation and library behavior. The migration went through 128 pull requests as GitHub shipped 135 runtime releases.

The new runtime can be embedded in applications through a C interface instead of requiring a separate Node.js process. In one client startup, session creation and single-turn benchmark, reported time dropped from 5.25 seconds to 292 milliseconds; the old process also added about 100 MB of working memory per client. Those figures describe a measured scenario, not every Copilot interaction, but they show why the architecture change mattered beyond language preference.