The Daily Byte
Breaking
Welcome to The Daily Byte — real stories from across Pakistan.
Thursday, 26 November 2026 · Pakistan

The Daily Byte

Stories from Pakistan that deserve to be heard
Minor World

Anthropic Moves Claude API to Rust, Cuts CPU Use 70%

By The Daily Byte ·26 Nov 2026 ·4 min read
Street-level daytime photo of modern glass office towers on Howard Street, San Francisco, with the mid-rise HQ building in the centre foreground, cars parked along the street and a clear blue sky.

Anthropic has moved the Messages API, the main route through which customers and its own apps reach its Claude models, from Python to Rust, and says the rewrite uses about 70 percent less CPU per request. The company described the project in an engineering post published on Wednesday, 25 November 2026, calling it one of the most detailed public accounts of a core production system rebuilt largely by an AI model.

The Messages API is the gateway for paying customers as well as for Anthropic's own products, including Claude Code and Cowork. Anthropic built it in Python in 2023, when one engineer described it as little more than a request forwarder. Since then it has grown into a far heavier job: every request must now be validated, turned into a prompt, tokenised and screened by safety classifiers before a model ever sees it. Traffic grew roughly 1,800 times between early 2024 and autumn 2026, and Python's per-request overhead had become expensive at that scale.

What the new version delivers

According to Anthropic, the Rust version uses about 70 percent less CPU per request and more than 80 percent less memory per request, while median time to first token, the wait before a reply starts to appear, fell by about 20 percent on customers' Claude Code requests. Public traffic moved to the Rust service in September 2026, and the company says the switch happened without taking the service offline or freezing feature development.

Claude itself did much of the coding. Anthropic says the model wrote a first version of the API's core request path in about a week, and that by May 2026 Claude was writing more than 80 percent of the code the company merged. That speed, however, was not the hard part. As the post puts it, verification, not generation, had become the bottleneck.

Proving the rewrite behaved identically

The team had to prove the new service behaved exactly like the old one while the old one kept changing, as new models and features shipped throughout the migration. Its roughly 700 integration tests were tied to the Python implementation, and an audit of the ported tests found more than 100 weakened assertions. In April the Rust version passed about 98 percent of the tests, yet only about 24 percent of real production inputs produced matching results, a figure that briefly fell to 6.5 percent in early May.

Anthropic's answer was to use the live Python service as the reference. Live requests ran through both versions, with each model output replayed to the Rust side so the model's randomness could not create false mismatches. A script grouped new kinds of mismatch every 10 to 30 minutes and alerted a coordinating Claude agent, which assigned worker agents to reproduce each difference, fix it and add a test, with human engineers reviewing the resulting changes. The share of matching inputs rose from about 24 percent in late April to 99.6 percent by August.

An earlier, smaller attempt had shown why a halfway step would not do. In March 2026 the team rewrote only the code that parses a model's output in Rust and called it from Python, cutting CPU use by about 8 to 10 percent. Anthropic judged the gain too small for the added complexity, since each token then crossed between the two languages three times, and decided on the full rewrite instead.

Why it matters beyond Anthropic

The figures are Anthropic's own and have not been independently verified, and at least one earlier public discussion of the project gave lower estimates, so the 70 percent figure should be read as the company's reported result rather than a settled benchmark. Even so, the project is a notable test case for AI-written infrastructure: the model did the bulk of the coding, but shipping it safely took months of verification work, most of it organised by agents and checked by people. For other companies running large model-serving systems, the lesson is that the cost of proving a rewrite correct can dwarf the cost of writing it.