Anthropic Migrated Its Messages API from Python to Rust Using Claude Agent Teams
Anthropic disclosed on its official engineering blog that it has migrated the Messages API — the main channel through which Claude Code, Cowork, and all customers access Claude — from Python to Rust. The migration was motivated by API traffic surging roughly 1800x from early 2024 to fall 2026, with the original Python service needing stronger performance and reliability under scale. The project has been called a rare engineering feat by multiple relayers (e.g., threypointone quoting engineer katelynlesse's assessment — actually threepointone).
Confirmed
- Anthropic's official engineering blog published that the Messages API has completed its migration from Python to Rust, serving Claude Code, Cowork, and all customer traffic.
- Migration driver: API traffic grew roughly 1800x from early 2024 to fall 2026 (m3 relayed the specific figure).
- Core methodology: using the old Python service as an oracle (reference implementation), multiple Claude agents set up verification loops comparing old and new implementations to find and align behavioral differences (m2, m5).
- Engineer katelynlesse called it one of the coolest engineering feats she has ever seen, noting that the API has no deterministic behavior, so the team had to guarantee equivalence without a strict specification to rely on (m4 relay).
Why It Matters
- This is a public case of a large production service doing an AI-agent-assisted behavioral-equivalence migration: without a deterministic spec, using the old implementation as an oracle and batch-aligning differences with agents offers a reusable migration paradigm for the industry.
- The Messages API is the entry point for nearly all of Anthropic's product traffic; its tech stack switch to Rust directly affects latency, throughput, and stability, with real impact on heavy users (e.g., the Claude Code and Cowork ecosystems).
2026-11-26 ~ 2026-11-26 · 16 related posts
Primary sources
- Anthropic migrated its Messages API to Rust using teams of Claude agents to verify parity — AnthropicAI ·
- Anthropic migrated its Messages API from Python to Rust — with teams of Claude agents verifying the rewrite — ClaudeDevs ·
- Anthropic migrated Messages API to Rust using agents, with Python as the oracle — RLanceMartin ·
- [source] Anthropic migrated Messages API to Rust using agents, with Python as the oracle — RLanceMartin · 2026-11-26
- [source] Anthropic migrated its Messages API to Rust using teams of Claude agents to verify parity — AnthropicAI · 2026-11-26
- Anthropic migrated its Messages API from Python to Rust, with Claude agents hunting diffs — threepointone · 2026-11-26
- [source] Anthropic migrated its Messages API from Python to Rust — with teams of Claude agents verifying the rewrite — ClaudeDevs · 2026-11-26
- Anthropic engineer on the Rust rewrite of the Claude API, shadow-traffic verification, and dropping coding interviews — gigasquid · 2026-11-26
- Anthropic cut CPU use ~70% porting Messages API from Python to Rust, with Claude writing much of the code — nicolascraske · 2026-11-26
- Anthropic's Messages API traffic grew 1800x, forcing a full Python-to-Rust rewrite — FinanceYF5 · 2026-11-26
- Anthropic's Python-to-Rust API rewrite: 98% tests passed but only 24% of traffic matched — FinanceYF5 · 2026-11-26
- 98% Tests Passed but Only 24% Real Traffic Matched: Anthropic's Shadow Testing — FinanceYF5 · 2026-11-26
- Anthropic's Python-to-Rust Migration Hits 99.6% Input Parity, CPU Down 70% — FinanceYF5 · 2026-11-26
- Anthropic's Rust/Python Migration Hits 99.6% Input Parity, Cuts CPU 70% and Memory 80% — FinanceYF5 · 2026-11-26
5 near-duplicate retellings: petrusenko_max · nicolascraske · seanmcdonaldxyz · wavefnx · minchoi