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.
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.
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.