GitHub rewrote Copilot's entire runtime in Rust using AI agents — 800,000 lines, 14.5 weeks, $120,000

GitHub disclosed on 16 September 2026 that it rewrote the agent runtime powering GitHub Copilot from TypeScript into over 800,000 lines of production Rust, mostly AI-agent-generated across 128 continuously merged pull requests, completed in roughly 14.5 weeks for about $120,000 in model usage — a live case study in what large-scale AI-assisted development actually costs and looks like.

On 16 September 2026, GitHub disclosed that it had rewritten the agent runtime behind GitHub Copilot — previously TypeScript running on Node.js and V8 — into more than 800,000 lines of production Rust. Most of that code was produced with AI agent assistance, spread across 128 pull requests that were continuously merged into the live codebase rather than developed as one giant replacement branch that ships all at once. The whole migration took roughly 14.5 weeks and consumed about 136.3 billion tokens, at a model-usage cost of around $120,000.

That’s a genuinely useful data point, because it’s not a demo or a benchmark — it’s a shipped, load-bearing rewrite of the runtime for one of the most widely used AI coding products on the market, done by the company that makes it, with the receipts published.

Why the numbers matter more than the headline

A full-language migration of a production system this size, done conventionally, is normally scoped in engineer-years, not weeks, and priced accordingly. $120,000 in model spend against that baseline is a striking unit-economics story — but it’s not the whole picture. The continuous-merge approach (128 incremental PRs against one big-bang rewrite) is doing real work here too: it’s a structural choice that keeps a rewrite reviewable and revertible in pieces, which is exactly the discipline that makes large AI-assisted changes safe to ship rather than just fast to generate. The cost figure describes the generation; it doesn’t describe the review, testing and integration discipline that had to sit around it — and GitHub had that discipline available in-house as the tool’s own maintainer.

The comparison worth drawing

GitHub isn’t the only company running its own agents against its own production code this way — Anthropic has run comparable internal Rust migrations with a different playbook, and the pattern of “AI-agent-heavy rewrite, incrementally merged, cost disclosed” is becoming a recognisable genre of engineering case study rather than a one-off. That’s worth watching: as more vendors publish real cost and timeline numbers for agent-driven migrations, it gets easier to sanity-check what a comparable engagement should actually cost, rather than pricing purely off vendor marketing claims about AI coding speed.

So what

This is the clearest evidence yet that AI-assisted development can compress large, structural engineering work — language migrations, framework upgrades, legacy modernisation — that used to be too expensive to justify. The catch is the same one it always is: the compression comes from pairing capable models with an incremental process and real review, not from pointing an agent at a codebase and walking away. If you’re sitting on a legacy migration or a modernisation project you’ve been quoted as a multi-year effort, it’s worth a second look at what an AI-assisted approach changes. See our AI-assisted development page, or get in touch to talk through the specifics of your codebase.

← All research

More research.

GitHub AI usage API now returns per-model token counts, so Copilot spend can finally be traced to models

GitHub's AI credit usage REST API now returns six raw token counts per model for enterprises, organisations and individuals, giving Copilot cost tracking a real audit trail.

Read ›

Claude Code 2.1.335: add remote MCP servers from the terminal, a new Interrupt hook, and a harness audit for older models

Claude Code 2.1.335 adds a one-line command to register remote MCP servers as claude.ai connectors, an Interrupt hook event and a /claude-api harness-audit command for agent code written for older models.

Read ›

GitHub Copilot model controls shift: Claude Opus 4.8 (fast) retired, targeted model rules end 12 January 2027

GitHub retired Claude Opus 4.8 (fast) in Copilot on 30 November and is closing the targeted organisation model rules preview, with migration on 12 January 2027.

Read ›

Claude Code 2.1.334: REVIEW.md now works at folder level, plus a model search box and a visible auto-compact setting

Claude Code 2.1.334 extends REVIEW.md so AI code reviews follow rules held in folders, adds a search box for long model lists and shows the auto-compact window in settings.

Read ›

GitHub Copilot for JetBrains adds scheduled automations in preview and drops support for IDE 2025.2

GitHub Copilot for JetBrains can now run automated tasks on a schedule (preview), adds Microsoft Foundry and Azure OpenAI models to its agent, and no longer supports JetBrains IDEs 2025.2.

Read ›

Claude Code 2.1.333: REVIEW.md shapes AI code reviews, and you can stop one workflow agent

Claude Code 2.1.333 lets teams write their code review rules in a REVIEW.md file, lets one running agent in a workflow be stopped without halting the rest, and changes how permission lists are passed in scripts.

Read ›

Start a project

Building with AI? Let's talk.

Tell us what you are building. We'll give you an honest view of the right approach.

Start a projectSee our work