← All use casesCoding

Port a large production codebase to a new language in place with agent sessions

Stephen Toub describes how the GitHub Copilot agent runtime, which backs the Copilot CLI, app and SDK, was rewritten from TypeScript to Rust mostly by agents and mainly by one developer over about fourteen weeks. Each of 128 pull requests swapped a component for a thin shim into Rust and deleted the old code, while all end to end tests kept running and main kept shipping, with 135 releases in the window. Parent sessions spawned child sessions in separate worktrees and subagents for exploration, and an agent merge loop handled CI failures and review comments. By August 21, 2026 the runtime was 832,378 lines of Rust. One turn sessions became up to 18 times faster in process. Tokens cost about $120,000, plus roughly three weeks of his time.

Tools used

  • GitHub Copilot app
  • Copilot CLI
  • Claude Opus
  • GPT

Sources (2)