Geo News
Community curated by people like you
LatestAICryptoHealthWorld AffairsUS Politics
Microsoft ports Copilot runtime to Rust using AI agents for $120,000
00

Microsoft ports Copilot runtime to Rust using AI agents for $120,000

Sep 18, 2026

GitHub has successfully migrated its Copilot runtime from TypeScript to Rust, leveraging AI agents to convert 430,000 lines of code into 800,000 lines of production Rust. Led by Microsoft Distinguished Engineer Stephen Toub, the 14.5-week project cost $120,000 in AI tokens and three weeks of developer time. The rewrite achieved a 15.9x speedup in session throughput and reduced memory usage by 90%, despite developers navigating dozens of compiler-approved code regressions.

Copilot runtime Rust migration

  • ▪The original GitHub Copilot runtime architecture was built on TypeScript, Node.js, and Google's V8 JavaScript engine, which required launching a separate Node.js process per client
  • ▪GitHub migrated the runtime powering the GitHub Copilot command-line interface, application, and software development kit from TypeScript to Rust
  • ▪The original TypeScript and Node.js architecture for GitHub Copilot added approximately 100 MB of working-set memory per client and limited startup speed, throughput, and server density

AI agent-driven code porting

  • ▪During the porting of a 30,000-line file named session.ts, an AI agent session spawned 15 child sessions that communicated and coordinated with each other using a built-in orchestration skill
  • ▪Bun creator Jarred Sumner previously ported an Anthropic-owned JavaScript runtime containing 535,000 lines of Zig code to Rust using Claude agents for $165,000
  • ▪The migration of the GitHub Copilot runtime from TypeScript to Rust was completed primarily by AI agents, converting 430,000 lines of TypeScript into 800,000 lines of production Rust
  • ▪The GitHub Copilot runtime's migration from TypeScript to Rust utilized GitHub Copilot and multiple large language models, including GPT-5.6 Sol and Claude Opus 4.8, to execute different parts of the porting work

Performance improvements from Rust

  • ▪In a 1,000-session lifecycle test, the Rust-based GitHub Copilot runtime running in-process achieved a throughput of 120 sessions per second, compared to 7.55 sessions per second for the TypeScript version
  • ▪Local end-to-end tests of the GitHub Copilot runtime's migration from TypeScript to Rust showed that creating a client, starting a session, completing one turn, and tearing it down fell from 5.25 seconds with the TypeScript runtime to 292 milliseconds with the in-process Rust runtime
  • ▪A ten-client workload running on the Rust-based GitHub Copilot runtime consumed 126 MB of memory in-process, compared to 1,383 MB consumed by the original TypeScript implementation

AI coding regressions

  • ▪Despite the dozens of regressions—including incomplete ports, changed behavioural contracts, and state and lifetime errors—encountered during the GitHub Copilot runtime's migration from TypeScript to Rust, the share of public quality-related issues for GitHub Copilot remained stable at 23.7% during and after the migration, compared to 22.9% before
  • ▪At the RustConf conference in Montréal, consultant Lisa Crossman warned that while the Rust compiler prevents AI coding agents from writing memory-unsafe code, it does not prevent them from writing incorrect program logic
  • ▪Microsoft Distinguished Engineer Stephen Toub reported that the GitHub Copilot runtime's migration from TypeScript to Rust encountered dozens of compiler-approved regressions, including incomplete ports, changed behavioral contracts, and state and lifetime errors

Migration cost timeline

  • ▪The GitHub Copilot runtime's migration from TypeScript to Rust spanned 14.5 weeks and over 135 releases, with approximately 1.3 port pull requests opened per day
  • ▪The GitHub Copilot runtime's migration from TypeScript to Rust cost approximately $120,000 in AI model token usage, consuming 136.3 billion tokens, and required about three weeks of a lead developer's time

Debatable claims

  • ▪AI agents are ready to perform large-scale software migrations
  • ▪The Rust compiler makes Rust the ideal target for AI-generated code

2 sources

The Register
Microsoft agentically ports Copilot runtime to Rust for $120K
View source article
Analytics India Magazine
GitHub Migrates Copilot Runtime to Rust
View source article

Featured stories

View more in AI agents

OpenAI announces Codex cloud environments, Decisions API and Ultrafast tier at DevDay 2026

Sep 29, 2026 · 7 sources

Microsoft revamps Copilot with unified app for business and consumers

Sep 25, 2026 · 4 sources

OpenAI unveils ChatGPT overhaul with shared workspaces, plugin system, and $500 monthly tier at DevDay

Sep 29, 2026 · 13 sources

OpenAI and Synopsys partner to develop AI model for chip design

Sep 30, 2026 · 3 sources

Story comments

Loading comments…

Related Projects

GitHub Copilot

Topics

AI agentsAI for developersAI coding assistantsSoftware development automationRustMicrosoftAI labor & economic disruption

Featured stories

View more in AI agents

OpenAI announces Codex cloud environments, Decisions API and Ultrafast tier at DevDay 2026

Sep 29, 2026 · 7 sources

Microsoft revamps Copilot with unified app for business and consumers

Sep 25, 2026 · 4 sources

OpenAI unveils ChatGPT overhaul with shared workspaces, plugin system, and $500 monthly tier at DevDay

Sep 29, 2026 · 13 sources

OpenAI and Synopsys partner to develop AI model for chip design

Sep 30, 2026 · 3 sources