Key takeaways

  • Anthropic moved public Messages API traffic from a Python service to a Rust rewrite in September 2026, without downtime.
  • It says the Rust version uses about 70% less CPU and over 80% less memory per request, with about 20% lower median time to first token.
  • Claude drafted the core code in about a week; matching the old service on live traffic, from about 25% to 99.6%, took until August.

Anthropic said on November 25, 2026 that it rewrote its Messages API, the service behind every Claude API call and its own apps such as Claude Code, from Python to Rust. In an engineering post, the company says the Rust version uses about 70% less CPU and more than 80% less memory per request, and cut median time to first token by about 20% on Claude Code requests measured from September 7 to 21. Public traffic moved to Rust in September, without taking the service offline.

The reason was scale. Anthropic says traffic grew roughly 1,800 times between early 2024 and fall 2026, and Python's overhead on every request and every token grew with it. An earlier, partial rewrite that moved token parsing to Rust cut CPU by only 8 to 10%, so the team rewrote the whole request path.

The more useful part for developers is how it checked the work. Claude wrote a first version of the core path in about a week. Making it match the old service took months. The team used the live Python API as the reference: it shadowed production traffic, ran the model once per request, replayed that same output into the Rust service, and compared each step, logging only fingerprints of any difference rather than user text. In April the Rust code passed about 98% of its tests but matched only a quarter of real production inputs. By August the match rate was 99.6%. "Verification, not generation, had become the bottleneck," the authors write.

For API customers, nothing changes in how they call Claude. For teams planning their own AI-assisted rewrites, the post is a detailed account of where the time goes. Anthropic's recent Claude Ship launch targets the same review-and-verify step.

Sources

  1. Migrating our Messages API to RustAnthropic

Add ClaudeGPT Si as a preferred source on Google