InfraAnthropicConfirmed
Story 5 of 13 in the Wednesday 25 November editionAnthropic migrates Claude Messages API to Rust, cutting CPU usage 70%
Zero-downtime Python-to-Rust rewrite trims median time to first token 20% across 1,800x traffic growth using live shadowing and Claude agent loops.

Anthropic detailed on 25 November 2026 how it migrated its production Claude Messages API from Python to Rust without downtime or a feature freeze after request traffic grew roughly 1,800 times between early 2024 and fall 2026. The Rust service cuts CPU usage per request by about 70% and reduces median time to first token by roughly 20% for external API customers alongside Claude Code and Cowork.

An incremental rewrite that moved only token output parsing to Rust saved just 8% to 10% CPU while forcing every token to cross between Python and Rust three times. By May 2026, Claude was writing over 80% of merged code at Anthropic and drafted the core Rust request path in about a week, turning verification into the primary bottleneck.
Shadowing live production traffic with Claude verification loops
Anthropic’s roughly 700 ported Python integration tests proved unreliable: an audit uncovered over 100 weakened assertions, and in April the Rust server passed about 98% of tests yet matched only a quarter of live inputs. Instead, engineers turned the live Python service into a shadowing oracle, executing each model call once and replaying its output to Rust while logging only privacy-preserving checkpoints and bug fingerprints without reading user text.

Every 10 to 30 minutes a script grouped new fingerprints and alerted a coordinating Claude agent, which dispatched worker agents through a sub-second local sandbox inner loop, a live production outer loop and a memory loop linked to engineer Slack threads, extending Anthropic’s autonomous PR agent workflows. Anthropic has not announced API price reductions tied to the server efficiency gains.

Technical details
- Performance improvements
- About 70% less CPU per request and roughly 20% lower median time to first token
- Traffic scale and migration mode
- ~1,800x growth (early 2024 to fall 2026); zero-downtime live rollout with no feature freeze
- Agent code generation share
- Core Rust path drafted by Claude in ~1 week; >80% of Anthropic merged code written by Claude by May 2026
- Parity debugging architecture
- Single model execution replayed to Rust; privacy-preserving checkpoints, fingerprints and 10 to 30 minute coordinator triage
Release details & context
Why Python integration tests missed real production edge cases
Anthropic noted that 20 binary API options alone yield over one million configurations, making exhaustive unit testing infeasible before varying prompt contents. Subtle differences such as Python escaping emojis inside JSON tool calls while Rust emitted raw UTF-8 bytes altered model inputs without triggering HTTP errors.
Because customer payloads could not be inspected directly, checkpoints isolated which processing stage diverged (validation, prompt assembly, tokenisation, safety screening or stream parsing) and fingerprints recorded the offset and byte-length delta, allowing worker agents to synthesise reproducing test cases locally in under a second.
Common questions
How did Anthropic verify Rust parity without double-billing customers or reading prompts?
Anthropic executed the model once per shadowed request, replayed the identical token stream to the Rust stack without double-counting limits, and logged only structural diff fingerprints rather than raw customer text.
Sources
- PrimaryAnthropic Research: Migrating our Messages API to Rustanthropic.com
- On XAnthropic (@AnthropicAI) Messages API Rust migration post on Xx.com
Anthropic release timeline (52 launches tracked)
- Anthropic lets Claude artifacts install as Mac and Windows apps
Anthropic launches an Install as app beta in Claude for Mac and Windows so artifacts run as standalone desktop apps with granular host permissions.
- Anthropic ships Skills over MCP beta and Tasks GA in Claude
Anthropic marks MCP’s second anniversary by launching Skills over MCP in public beta and promoting background Tasks and Elicitation to GA.
- Anthropic introduces Siren benchmark for agent sandbox escapes
Anthropic unveils Siren across 1,753 weakened-sandbox scenarios, cutting out-of-bounds Claude access by up to 96% with explicit boundary prompts.
- Anthropic revisits individual MLP neurons for safety auditing
Anthropic Fellows show individual MLP neuron output vectors act as zero-shot safety detectors, steering vectors and unlearning auditors on open-weight models.

