Anthropic

Anthropic rewrites the Messages API in Rust, cutting CPU per request by about 70%

Anthropic has migrated its Messages API — the channel behind the Claude API, Claude Code, and Cowork — from Python to Rust, with public traffic running on Rust since September and per-request CPU down about 70% in one region.

Anthropic has moved its Messages API from Python to Rust, according to an engineering blog post published on November 25, 2026. The Messages API is the channel through which the Claude API, Claude Code, and Cowork receive requests; public traffic was cut over to the Rust implementation in September.

In the region that was measured, CPU use per request fell by about 70% and memory use by more than 80%, while median time to first token on Claude Code requests dropped by about 20% over the September 7–21 measurement window. Anthropic says the migration happened with zero downtime and no freeze on feature development.

Claude itself wrote most of the new code: a first version of the core request path was completed in about a week, and Claude has written more than 80% of the merged code at Anthropic since May 2026. Production traffic served as the verifier, with shadow traffic and fingerprint comparison catching differences, and agents automatically fixing discrepancies.

The rewrite comes as API traffic has grown roughly 1,800 times since early 2024 — the original Python system, built in 2023, was running hot, Anthropic says.

Read the original · Anthropic

Share