Rewrite a runtime from TypeScript to Rust with agents
GitHub engineers used Copilot tools to have agents write most of an 800,000-line Rust rewrite of the Copilot runtime across 128 PRs, fixing a few regressions.
Done withGitHub Copilot
- What they did
- One developer, Stephen Toub, used the Copilot app and CLI to port the runtime in place, one component per PR. Each PR replaced TypeScript with a thin shim into Rust and kept the existing end-to-end tests running. Parent sessions spawned child sessions, each in its own worktree, plus subagents. He checked results, challenged decisions and enforced quality gates.
- How it went
- The runtime became 100% Rust, about 832,000 production lines, across 128 PRs in roughly 14.5 weeks. A few regressions were fixed quickly, and the post says performance improved by orders of magnitude.
- Worth knowing
- Fifteen concurrent agents building at once froze his laptop. He fixed it by letting only the parent build, then by making a chat session hand out build permission one session at a time.
Try it yourself with GitHub Copilot
I want to migrate [module or component] in [owner/repo] from [current language] to [target language]. First write a plan that splits the work into small, independently reviewable pull requests, and show it to me before starting. Then work through them one at a time, with each PR passing the existing tests, and list any behavior differences you find.
Want help getting this working? Join the Vibe Coding Academy ↗ Run by Alex Finn, who also runs this site.
Source: github.blog · Undated
Related use cases
Run a solo company with eight agent departments
A founder set up CEO, CFO, COO, lawyer, accountant, marketing, CTO, and improver agents that share memory and consult each other.
Assign website tweaks to Copilot coding agent
An author gave the Copilot coding agent two small changes on their own site; it opened draft PRs and the spacing change was good enough to merge.
Run terminal commands with Copilot agent mode
Users report the agent sometimes fails to read terminal output and may undo correct code; workarounds include switching shells.
Build a C compiler with a team of parallel agents
Anthropic's engineering write-up on tasking Opus 4.6 agent teams with building a C compiler.
Troubleshoot a production-only performance issue
A developer used Cursor and Warp agents to analyze NestJS database queries and recommend indexes for a production performance problem.
Let terminal agents make phone calls
A CLI tool built on Twilio gives terminal agents a voice to make calls, with a dashboard for questions they can't answer.
Custom agent
Get 5 like this every morning
The best things people got an AI agent to do, each with the prompt to try it.