On November 25, Anthropic (@AnthropicAI) published an engineering post on moving its Messages API from Python to Rust in one migration, in a post with about 1,660 likes. The post says API traffic grew about 1,800x from early 2024 to fall 2026. Claude wrote a first version of the core request path in about a week; the hard part was verification. In April the Rust version passed about 98% of tests, yet only about a quarter of inputs matched on production traffic. The team used the live Python service as the verifier through shadowing, grouped diffs by step checkpoints and fingerprints, and had a coordinator agent dispatch Claude agents to reproduce and fix them. The result uses about 70% less CPU per request and cuts median time to first token by about 20%, with no downtime and no feature freeze.
Key Takeaways
- ✓Result: about 70% less CPU per request and about 20% faster median time to first token; public traffic moved to Rust in September 2026
- ✓Tests were not enough: with about 98% of roughly 700 integration tests passing, only about a quarter of production inputs matched (for example emoji escaping in JSON tool calls)
- ✓Verification: shadowing ran the model once and replayed its reply, compared results step by step with checkpoints, and fingerprinted diffs by position and length without double billing
- ✓Agent loop: a script grouped diff records every 10 to 30 minutes, alerted a coordinator agent only on new kinds, and worker agents reproduced and fixed them with evidence posted to Slack
- ✓Lesson: writing code is no longer the bottleneck, verification is; humans define what counts as correct and agents work inside the verification loops

Key Decision Metrics at a Glance
Heavy Claude Code use: compare subscription limits and API bills
Compare 40 dev plans & simulate token costs vs $20/mo subscriptions
Project Links & Resources
Direct AccessIn-Depth Technical Analysis
Background
Full rewrites of large live systems are usually seen as risky: tests never cover everything and the effort is huge. Anthropic's Messages API serves customers as well as Claude Code and Cowork, and its traffic grew about 1,800x in under three years, making Python overhead expensive. The official Anthropic post introduced a new engineering blog on how the team did the migration anyway.
How it works
According to the engineering blog, Claude wrote a first version of the core request path in about a week; the hard part was proving parity with production. The team turned the live Python service into the verifier: shadowing ran the model once and replayed the reply, checkpoints compared each step such as validation, settings and prompt building, and diffs were fingerprinted by position and length. A script grouped diffs on a schedule, and a coordinator agent handed new kinds to Claude agents that reproduced and fixed them in a sandbox before checking fixes on shadowed traffic.
Numbers that matter
In April the Rust version passed about 98% of tests, yet only about a quarter of production inputs matched. The final result uses about 70% less CPU per request and cuts median time to first token by about 20%. An earlier incremental rewrite of only output parsing had saved just 8% to 10% of CPU.
What it means for developers
The API itself is unchanged, so callers need no code changes. Teams planning big migrations can borrow three ideas: define correctness first, shadow production traffic, and group diffs so agents can work through them in loops.
Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.
Discussion & Comments
Sign in to join the discussion
Connect with AI developers to exchange benchmark insights.