Microsoft's AI agents ported Copilot's runtime to Rust for $120K — then hit dozens of regressions

Microsoft agentically ports Copilot runtime to Rust for $120K

Microsoft's AI agents ported Copilot's runtime to Rust for $120K — then hit dozens of regressions

Microsoft rewrote the GitHub Copilot runtime from TypeScript to Rust almost entirely with AI agents, spending about $120,000 in tokens and three weeks of developer time across 135 releases. The port converted 430,000 lines of TypeScript into 800,000 lines of Rust, yielding a 15.9x speedup and a 10x memory reduction. But engineers still had to fix dozens of compiler-approved regressions, exposing AI's limits in understanding Rust.

Rust stops the agent writing memory unsafe code; it does not stop the agent writing the wrong program correctly.
  1. turowicz

    They really built that shit in TS? Mad!

  2. Rexxar

    They don't have to tell us they are vibe coding everything.

    - there are now ridiculous vibe coded localisation in VS2026

    - task manager started to not report cpu usage correctly

    recently (the number becomes stalled)

    - file explorer display the "loading" icon infinitely on some directories

    - and many other things!

  3. tecoholic

    One of the thorniest conversions was the session.ts file, which was over 30,000 lines of TypeScript that touched all aspects of the runtime.

    This can’t be real. Single file with 30K lines? Which human being is working on it and how much RAM does it take for a code editor to load that with full symbol tree? I am genuinely curious. Is this common? I think most files I come across stretch to maybe 2-3k lines max.

  4. meerita

    I wrote to the post of Andrea (a dev from the Copilot team) about their 800K LoC: 128 PRs, shipped incrementally. Existing end-to-end tests ran against the new code at every step.

    Total: ~1,301,378 lines of Rust.

    Production: 832,378

    Unit tests: ~469,000

    Combined: ~1.30 million lines

    On top of the 832K LoC are mostly tests she answered:

    > Yeap, 832,378 lines of production Rust. the +800K number is production only; unit tests are another +469K on top.

    https://x.com/acolombiadev/status/2100660224298193081?s=20

  5. dmix

    > agents converted 430,000 lines of TypeScript into 800,000 lines of production Rust

    The +400k new lines were probably code comments the agents added to everything

More from this day

2026-09-20