Developer News
Anthropic says Claude agents migrated its Messages API from Python to Rust in production, cutting CPU per request by about 70%. The hard part was not writing the code. It was proving the new version was right.

Keep exploring
Anthropic says Claude agents helped rewrite the very API that serves Claude. The company moved its Messages API from Python to Rust with no downtime, cutting CPU use per request by about 70% and median time to first token by about 20%, according to its own Anthropic post published Nov. 25.
The Messages API is the main way customers, and Anthropic's own apps like Claude Code and Cowork, reach Claude. Per Anthropic and InfoWorld:
API traffic grew roughly 1,800 times from early 2024 to fall 2026, Anthropic says. The Python service, built in 2023 as what one engineer called "basically a request forwarder," was not designed for that load.
Anthropic's own chart of daily API requests barely registers through 2024, climbs gradually in 2025, then shoots up in 2026 to its highest point in October. By late 2025, every request also had to be validated, turned into a prompt, tokenized and screened by safety classifiers, and Python added overhead to each of those steps.
Anthropic said the old advice against full rewrites no longer held. By May 2026, it says, Claude was writing more than 80% of the code Anthropic merged. A first attempt that rewrote only the output-parsing code in Rust saved just 8% to 10% of CPU, because every token then crossed between Python and Rust three times. A full rewrite was the only way to get real gains.
One engineer had once settled the question in 2024 with a flat "We are not rewriting the API in go or rust!" Two years later, the team did exactly that.
Writing code was no longer the bottleneck. Checking it was. Anthropic listed why that was hard:
The existing test suite of about 700 integration tests did not help enough. The tests were tied to the Python implementation, and when Claude ported them, some got weaker. An audit found more than 100 weakened assertions. In other words, a passing test could mean the code was right, or that the test had been changed to let wrong code through.
Anthropic instead turned the production API into the verifier. It ran real requests through both the old and new code, compared the results, and recorded each difference without keeping customer content. Agents were then dispatched automatically to fix those differences, with humans reviewing the changes, per InfoWorld.
This is the "AI builds itself" story with receipts. A company used its own model to rewrite the infrastructure that serves that model, on live traffic, with measurable savings. For developers, the lesson is Anthropic's own: when AI makes generating code cheap, verification becomes the expensive part. Teams that only measure how fast AI writes code will ship bugs they cannot see.
It is also a hint about where engineering jobs shift. If an agent can write a first version of a core service in a week, the scarce skill is defining what "correct" means and building the checker that proves it. Expect that to show up in job descriptions soon. The numbers here are Anthropic's own measurements on its own service, so independent confirmation will have to wait for others to try the same approach.