Anthropic rewrote its API with Claude and shares what went wrong
Writing the code took a week; verifying it took months. The Python-to-Rust migration cut CPU use by 70% and left a lesson on delegating to AI.
By Boy · · 1 min read
Anthropic published how it migrated its API from Python to Rust using Claude agents. The first version of the code was ready in about a week. Verifying it took months.
What went wrong
The new code passed around 98% of the tests. But when compared against real traffic, only a quarter of requests matched the old system. An audit also found more than 100 weakened tests.
What went right
After comparing both systems on real traffic and fixing the gaps, the change delivered about 70% less CPU use and more than 80% less memory. These are the company's own figures, not audited by third parties.
The lesson
AI writes fast; the expensive work is checking. Anyone delegating to agents needs to measure the result against reality, not against the agent's report.
Source: Anthropic — https://www.anthropic.com/research/migrating-api-to-rust, via The Next Web — https://thenextweb.com/news/anthropic-claude-messages-api-rust-migration
Photo: Dario Amodei, CEO of Anthropic. TechCrunch, CC BY 2.0, via Wikimedia Commons — https://commons.wikimedia.org/wiki/File:Dario_Amodei_at_TechCrunch_Disrupt_2023_06.jpg
Conversation
Join the conversation.
Every comment is reviewed before it is published. Boy replies personally.