Osegi
AI·1 min read

Claude rewrote Anthropic's own API code in Rust, cutting CPU use 70%

Anthropic let Claude rewrite the core of the system that serves Claude. CPU use per request fell about 70% and memory use dropped more than 80%.

A developer's screen showing code being rewritten from Python to Rust next to a chart of falling CPU usage.
Image: اليوم السابع

Anthropic asked Claude to rewrite part of the software that runs Claude. The result: about 70% less CPU use per request, and answers that start appearing roughly 20% sooner.

According to an engineering report from the company, traffic to the Messages API, the interface developers use to talk to Claude, grew about 1,800 times between early 2024 and autumn 2026. At that scale, efficiency stops being a nice extra. So the team moved the request-handling code from Python to Rust, a language known for being fast and frugal with memory.

Claude wrote a first version of the core request path in about a week. Writing it was the easy part.

How did Anthropic check the Claude-written Rust code?

The hard part was proving the new code behaved like the old one. The old system kept getting updates during the migration, and the model's answers are not always identical when the same request is repeated, which makes a simple before-and-after comparison messy.

Engineers ran both systems side by side on real production traffic and compared the results. Where the tests turned up differences, they handed the fixes to AI agents.

What changed after the switch?

CPU use per request fell by about 70%, and the average time before an answer begins to appear dropped by about 20%. Memory use per request fell by more than 80%.

Anthropic says it made the move without taking the service offline and without freezing work on new features.

For everyday users, the visible effect is mostly a slightly quicker start to replies. For the company, fewer processors per request means the same hardware can handle far more traffic.

Apps worth a look

SUMO: the number puzzle

Tap the right tiles, add them up, hit the target. Easy to learn, hard to master. Free, for all ages.

Tags:anthropicclauderustpythonmessages apiinfrastructure

More from this day

See all →

More in: AI

See all →