GitHub

How AI Helped GitHub Rebuild Its Copilot Engine in 14 Weeks

GitHub migrated more than 800,000 lines of Copilot runtime code from TypeScript and Node.js to Rust in about 14.5 weeks, using AI-assisted development to make it happen. The incremental approach leaned on N-API…

3 min readInfoQ
How AI Helped GitHub Rebuild Its Copilot Engine in 14 Weeks

GitHub's migration of its Copilot runtime from TypeScript to Rust in 14.5 weeks is not a story about speed, though the speed is impressive. It's a story about how AI-assisted development changes the calculus of large-scale refactoring, and every team that has ever dreaded a rewrite should pay attention. The team moved more than 800,000 lines of code across 128 pull requests while still shipping releases, using N-API interoperability to keep the old and new systems talking to each other. That is the practical definition of progress: not a big-bang replacement, but a controlled, continuous transition that never put users on hold.

The most instructive part is what made the pace possible. AI didn't write the migration on its own, and GitHub didn't hand the keys to an automated process. They combined AI-assisted code generation with automated testing and human review, which is exactly the division of labor that makes sense. The machine handled the mechanical translation work, the tests caught regressions, and humans made judgment calls about architecture and edge cases. This is a template, not a one-off. Compare it to Shopify's Checkout Blocks Rewrite Delivers Faster Loads and Leaner Bundles, where the focus was on trimming bundle size and improving load performance. Both rewrites share a willingness to touch core infrastructure, but GitHub's story shows that AI can compress the timeline dramatically when the goal is a language shift rather than a feature optimization.

What this means for readers is direct: the excuse that "we don't have time for a rewrite" is losing its weight. If GitHub can migrate the runtime behind one of the most widely used developer tools in the world in under four months, most teams can at least start a similar journey. The constraints were real, too. They kept shipping releases during the migration, which is the hardest part of any refactor. That alone signals that this wasn't a heroic exception; it was a process built on incremental steps, interoperability layers, and continuous verification. The practical takeaway is to break large migrations into small, reviewable chunks and let AI handle the grunt work while humans focus on correctness and design.

There is an open question worth watching: how much of that 14.5 weeks was spent on the migration itself versus training the AI tools to understand GitHub's specific codebase? The story doesn't say, and that distinction matters. If most of the time went into context and setup, then the next migration will be faster. If the AI was already well-tuned, then the bottleneck shifts to human review capacity. Either way, the precedent is set. The next time someone says a rewrite will take a year, ask them to explain why it can't take fourteen weeks. The burden of proof has moved.

From InfoQ

GitHub migrated more than 800,000 lines of Copilot runtime code from TypeScript and Node.js to Rust in about 14.5 weeks using AI-assisted development. The incremental migration used N-API interoperability, automated testing, human review, and 128 pull requests while continuing to ship releases.

Read the original at InfoQ