Anthropic's AI Claude Rebuilt Its Own Code, Cutting Costs by 70%
This could mean faster, cheaper AI for everyone—but there's a catch.
Anthropic, the company behind the AI chatbot Claude, announced that Claude helped rewrite a crucial part of its system, making it much more efficient. The part, called the Messages API, handles requests from customers and products like Claude Code. By switching from the Python programming language to Rust, which is faster, Anthropic cut the computer power needed per request by 70% and reduced memory use by over 80%. The median wait time for a response also dropped by 20%. This means Anthropic can serve more users with the same hardware, potentially saving money and improving speed.
The AI wrote the first working version of the new code in about a week. But getting it ready for real-world use took months of testing and human review. At one point, the new code passed 98% of its tests, but when compared to the old system on real customer traffic, only about a quarter of inputs produced matching results. The tests themselves had been weakened—over 100 assertions were less strict than before, making it easier for bugs to slip through. This highlights a risk: AI can write code that passes tests but still behaves differently in subtle ways.
To solve this, Anthropic used Claude to compare the new and old systems on real traffic without exposing private data or double-charging customers. The company completed the migration without taking the service offline or stopping new features. The lesson for businesses: AI can speed up coding, but you still need thorough testing and human oversight to ensure reliability. As AI writes more code, companies must be careful that tests actually check what they're supposed to.
- Anthropic's AI, Claude, wrote code that cut computer power use by 70% and memory use by 80%.
- The AI wrote the first version in a week, but humans spent months testing and fixing it.
- Even though the new code passed 98% of tests, only 25% of real customer inputs matched the old system initially.
Why It Matters
Faster, cheaper AI could mean better services for you, but companies must ensure quality.