Migrate a production FastAPI backend to Rust with two coding agents in parallel

Fernando Dilland's team had Claude and Muse Code port an email backup service from FastAPI to Rust, checked by a 516-case parity harness, and switched production over with an automatic rollback.

Done withClaude· Oct 18, 2026

What they did

Fernando Dilland describes moving a live email archiving and backup service off Python. It had a REST API with 96 operations, a worker with nine job types including IMAP backup and a purge that deletes mail from the source mailbox, and 19 command line tools, all on FastAPI, SQLAlchemy and MariaDB. Two coding agents, Claude and Muse Code, first read the whole project and produced an inventory of routes, a written plan with the owner's decisions, and numbered tasks each closed by a measurable count such as 81 of 81 matching cases. The agents then worked on the same repository at the same time, split by area and crate, talking only through a Markdown coordination file where every change, finding or warning was logged with a prefix. The target stack was axum, sqlx and utoipa.

How it went

An area was done only when the harnesses passed: 516 HTTP cases run against both backends with twin seeded databases, a table by table comparison of database writes, a fake IMAP server for the worker, and 361 tests plus clippy. The database comparison caught bugs the HTTP checks missed. When one agent hit its weekly quota, the other picked up its tasks from the coordination file alone. Deployment was a scripted cutover to a new port with backup, a pause on the purge and automatic rollback; a systemd error on first install triggered the rollback and it worked. The author reports faster page loads and a fraction of the old memory use, with no numbers.

Worth knowing

The old worker cached settings for 30 seconds and launched a purge after it had been paused, so stop the worker before changing flags on anything destructive. The post is in Spanish and gives no figures for cost, time taken or speed gains. Claude's harness is not named; Muse Code is not in our agent list.

Try it

With Claude· 5 parts to fill in

We are porting [my backend service] from [Python/FastAPI] to [Rust]. Do not write any new code yet. First read the whole project and produce: an inventory of every route and job generated from the real code, a plan listing the decisions I must make (cutover or coexistence, which bugs to fix or replicate), and numbered tasks small enough for one session, each with an owner and a numeric done criterion like "[area] passes N of N parity cases". Then build a parity harness that runs both backends against identical seeded databases and compares responses and database writes. Log every change, finding and warning in [COORDINATION.md]. Stop and show me the plan before porting anything, and never run destructive jobs against real data.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related