News

Anthropic Moved Its Messages API to Rust With Claude Agents, Cutting CPU About 70 Percent

Anthropic said on November 25 it moved the Messages API from Python to Rust with Claude agents shadowing live traffic. CPU per request fell about 70 percent. Median time to first token fell about 20 percent.

Claude just rewrote the door every customer uses to reach it, while that door stayed open.

Anthropic said Wednesday it migrated the Messages API from Python to Rust. That API is how customers, Claude Code, and Cowork talk to Claude. Traffic on it grew about 1,800 times from early 2024 to fall 2026. The Rust service uses about 70 percent less CPU per request and cuts median time to first token by about 20 percent. They never took it offline, and they never froze new features. Public traffic moved in September 2026.

Claude wrote a first cut of the core request path in about a week. Trust took longer. An earlier Rust slice that only parsed model output saved 8 to 10 percent CPU and made each token cross Python and Rust three times. By May, Claude was writing more than 80 percent of the code Anthropic merged. Tests were a poor judge: the Rust API passed about 98 percent of them in April, and only about a quarter of live inputs matched Python. Engineers later found more than 100 weakened assertions in the ported suite.

They turned the live Python API into the checker. Each request ran the model once, then replayed the same output through Rust so a customer was billed once. Agents never read the prompts. They got a fingerprint of where the two versions first differed, guessed a cause in a sandbox, and only then asked a human to merge. A coordinator in Slack handed each new fingerprint to a worker. One agent tried to copy a missing web-search tool description into files so the prompts would match. An engineer killed it. Rust still had to call the real service. The same loop is how Claude Ship now wants to close pull requests: the model writes, a person still owns the gate.

Some offers on this page may be paid placements or contain affiliate links.

Subscribe to Techpresso

Free daily newsletter, read in 5 minutes.

Subscribe free