Port the Copilot runtime to Rust agentically
Microsoft reportedly used agents to port its Copilot runtime to Rust for $120K, according to the headline.
Done with a custom-built or unnamed agent
- What they did
- Microsoft used Copilot, driven by several LLMs picked for their strengths, to rewrite the TypeScript Copilot runtime in Rust one module at a time. The port was a direct replacement and did not restructure the runtime. On the 30,000-line session.ts, one session read the docs, spawned 15 child sessions in separate worktrees, and had them coordinate with each other.
- How it went
- Agents turned 430,000 lines of TypeScript into 800,000 lines of Rust over 14.5 weeks and 135+ releases. A benchmark ran 15.9x faster and memory fell from 1,383 MB to 126 MB, but a few dozen regressions appeared.
- Worth knowing
- Cost was about $120K in tokens plus roughly three weeks of a developer's time. Compiling did not mean correct, so regressions still got through.
Try it yourself with Codex
I want to port [component or module] in [repo path] from [source language] to Rust using an agentic workflow. Start by reading the code and proposing a phased porting plan with test checkpoints, and wait for my approval. Then port one module at a time, keeping the existing tests passing, and finish with a summary of what's ported, what's left, and an estimate of effort.
Discussion on HN · Sep 20, 2026
Five of these in your inbox every morning
The best things people got an AI agent to do, each with the prompt to try it.
More like this
- Claude
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.
- Custom agent
Catch cloud outage risks before they happen
An autonomous ReAct agent that queries real data to stop cloud outages before they occur, built for the Sanity Challenge.
Hand narrow code changes to Devin for pull requests
A team used Devin for a month on small fixes like chart formatting and API edge cases, with tests and PRs; a complex full-stack task went poorly.
Migrate toolchain, architecture and site design with Claude Code
A developer had Claude Code switch a monorepo to oxlint/oxfmt, restructure the architecture and redesign a site, validating in a loop; the redesign took days instead of weeks.
Build and deploy a Game of Life simulation site
In a vendor launch demo, Devin built an interactive Game of Life website, added requested features step by step, and deployed it to Netlify.
Resolve a Slack-reported issue with a coding agent
A Codex agent resolved an issue passed to it in about 40 minutes, and an ops agent verified the fix back in Slack.