← In the News

GitHub ported the Copilot agent runtime to Rust with agents, and published the bill

Migrating the GitHub Copilot runtime to Rust, using Copilot · Stephen Toub, GitHub · The GitHub Blog, September 16, 2026

Machine-readable Download Markdown

Toub reports that roughly 430,000 lines of production TypeScript passed through the port, and that by August 21 the runtime stood at 832,378 lines of production Rust plus 468,689 lines of Rust unit tests. It was done in place on the main branch rather than in a long-lived branch: 128 port pull requests, each replacing a TypeScript component with a shim calling Rust and deleting the old code in one change, shipped across 135 releases in about fourteen and a half weeks. His token spend was about 136.3 billion tokens for a bill of about $120,000. The developer time is an estimate rather than a measurement, derived from the port accounting for about 20 percent of his pull requests over the window.

The session logs are instrumented and he publishes them: 12,760,995 events, and 1,130,921 tool calls, 61 percent of the total, issued by subagents rather than the main session. Of roughly 2,600 messages he typed himself, he had Copilot classify the intent, and 31.0 percent were review, testing and CI, 17.4 percent were challenges to a technical or design decision. Dozens of regressions were traced and fixed, sorted into recurring shapes that include TypeScript's single number type being guessed wrong in Rust, ambient Node behavior that the porting agent could not see, and paired operations where only one half was ported. On whether the compiler caught them: "every regression in the corpus was merged to main, which means it successfully compiled." Against that, the share of issues in the public copilot-cli repository carrying a bug label or a failure term barely moved, 22.9 percent in January to April against 23.7 percent in May to August.

Why it matters: The operating rule Toub draws out is about custody of the test, not about Rust. Agents that can edit the implementation must not also be able to weaken the thing that says the implementation is correct, which he states as protecting the oracle from the agent. He backs it with his own count: with one exception, every regression that involved a missing feature came down to insufficient end-to-end tests, and one port deleted the end-to-end test covering the callbacks it dropped. The cost line is the other usable number here. A migration priced at one developer-quarter plus $120,000 sits in a different approval bracket than one priced at a team-year, and that is the change he is actually claiming.