Back to feed

Migrating our Messages API to Rust

Anthropic Research

Nov 25, 2026

11/25/2026

Agent-Led Fixes With Human Oversight Enable Efficient Migration Lowering CPU Per Request And Reducing Time To First Token

Migrating our Messages API to Rust · Anthropic Research

Science, Technology & Innovation · Nov 25, 2026

The migration used agents for rapid, isolated experimentation while reserving production validation and design decisions for humans, completing without downtime and achieving about 70% lower CPU per request and 20% lower median time to first token.


11/25/2026

Single-Execution Replay and Stage-Level Content-Free Diff Signatures for Production Validation of Nondeterministic AI

Migrating our Messages API to Rust · Anthropic Research

Science, Technology & Innovation · Nov 25, 2026

Anthropic validated its live API privately by running each request once, replaying the same model output through a Rust implementation, and comparing processing stages using content-free mismatch metadata. Checkpoints and fingerprints localized and clustered defects without storing customer prompts or responses, avoiding duplicate charges and accommodating model nondeterminism.


11/25/2026

Treat Parity Observability And Production Verification As First Class During System Migrations

Migrating our Messages API to Rust · Anthropic Research

Science, Technology & Innovation · Nov 25, 2026

Anthropic’s API rewrite showed that generating replacement code was easier than proving behavioral parity: despite passing 98% of tests, the Rust implementation matched only about 25% of production inputs. Migration efforts therefore need dedicated parity observability and safe production verification, especially when tests are implementation-coupled or weakened during porting.