The whole dayWed 25 Nov 2026
AI Compass
WeeklyArchiveAbout

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

Official Anthropic editorial illustration showing mirrored pairs of grid-patterned coloured circles on a sage-green canvas representing Python and Rust API parity
Image: Anthropic

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.

Bar chart showing daily requests to Anthropic’s Claude Messages API surging roughly 1,800 times from January 2024 to October 2026
Daily Claude Messages API traffic from January 2024 to October 2026, showing the 1,800-times surge that outgrew Python.Image: Anthropic

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.

Line chart from Anthropic’s Rust migration post showing live Messages API input parity rising from 24% in May to 99.6% by August
Live input parity between the Rust Messages API and Python climbed from 24% in May to 99.6% by August as shadow-traffic diffs shrank.Image: Anthropic

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.

Flowchart depicting Anthropic’s inner loop, outer production loop and memory loop where Claude agents reproduce diff fingerprints, patch Rust code and validate against live traffic
Anthropic’s three-tier agent verification loops combining sub-second local checks, live traffic validation and human correction memory.Image: Anthropic

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.

Anthropic release timeline (52 launches tracked)

  1. Earlier24 Nov 2026
    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.

  2. Earlier24 Nov 2026
    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.

  3. Earlier24 Nov 2026
    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.

  4. Earlier24 Nov 2026
    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.

Explore the full Anthropic dossier or browse all infra releases.

Also in the Wednesday 25 November edition

Read all 13 launches on one page
  1. 01
  2. 02
  3. 03
  4. 04
  5. 06
  6. 07
  7. 08
  8. 09
  9. 10
  10. 11
  11. 12
  12. 13

Spotted an error? Email aicompass@ashutoshai.com or tag @ai_for_success on X

Daily & Weekly Briefing

Get the 5-minute AI briefing

Every confirmed AI launch from primary sources, in your inbox between 9:30 and 10:30 AM IST.

1-click unsubscribe · Privacy

! Please enter a valid email address (for example, you@domain.com).

Morning Edition Alerts

Get a 1-click alert at 9:30 AM IST

One quiet browser alert when each daily or Sunday Weekly edition goes live between 9:30 and 10:30 AM IST. No email required. Privacy