Anthropic migrates Messages API to Rust
Start here
Anthropic migrated the Messages API, the primary interface for accessing Claude, from Python to Rust, claiming about 70% lower CPU per request and about 20% shorter median time to first token, with no downtime throughout. The original roughly 700 tests were coupled to Python; the team used the production system as the validator, locating differences without reading user requests, with agents automatically fixing them and engineers reviewing.
Generated by AI from reports · Updated 4 days ago
Attention and developments
Attention, hourlyA report
Now 48, -25% in 24 hours·Peak 65 (Nov 26 11:00)·1 other outlet followed
Progress timeline
- WeChatWeChat · AI Cambrian· Media coverageIs Rust the one true god? Anthropic's core API fully migrated from Python to Rust: Claude rewrite took only one week(opens the original post in a new tab)
- Anthropic ResearchSelectedAnthropic migrates the Messages API to Rust
Anthropic migrated the Messages API from Python to Rust; the new version reduces CPU per request by about 70%, shortens median time to first token by about 20%, and did so without downtime or freezing feature development. This API is the main interface through which customers and its own applications such as Claude Code and Cowork access Claude; traffic grew about 1800-fold from early 2024 to autumn 2026. The bottleneck in the migration was verification rather than generation: the roughly 700 existing integration tests were coupled to the Python implementation and had incomplete coverage; in April the new API passed about 98% of the tests, yet on production traffic only about a quarter of inputs matched. The team used the production system itself as the verifier, locating differences with checkpoints and classifying bugs by fingerprint without reading user requests, and used an inner sandbox, outer production-traffic comparison and a memory loop to let agents automatically fix differences; fixes had to be reviewed by engineers.
Related discussion
What people think
By account: 85 hold one of the views above, 110 posted without a clear one, and 176 more only relayed the news. AI drew the views from the posts; a post is placed only when three models, judging apart, all agree. The posts themselves are the record.
- X@tevvioAnthropic says rewriting its Messages API in Rust cut CPU usage and improved first-token latency in production. The co…(opens the original post in a new tab)
- X@luyibo888🤖 AI world in the past 24 hours: Claude personally rewrote its own "heart," and open-source large models continue to push into healthcare! 1⃣ Anthropic used the Claude agent to rewrite the Messages API from Python to Rust. This is what handles every call to Claude…(opens the original post in a new tab)
- X@tharungoud1306Claude wrote Anthropic's Messages API in Rust in a week. Verifying it matched the Python version took months. Tests:…(opens the original post in a new tab)
- X@Henryyyyyy81Just finished reading Anthropic's official post on migrating the Messages API to Rust. Anyone doing hands-on AI testing, feel free to follow each other.(opens the original post in a new tab)
1 likes·Nov 28 14:14Collect
- X@guochen622To make the code pass the tests, Claude just changed the tests 😂 Anthropic had Claude migrate the Messages API from Python to Rust. The test pass rate was as high as 98%, but once real traffic hit, the accuracy rate was only around 25%. Looking into it afterward,…(opens the original post in a new tab)
5 likes·Nov 28 14:14Collect
- X@Appraiser008Looking at the current development trend, will China's AI be blown away by the US? An engineer living in South America told the truth: China's AI has two chronic problems, one soft and one hard. The soft one is WeChat: all enterprise business is deposited in WeChat groups, voice messages and expired files; to hand it to AI to organize, just extracting the information is enough to take half a year of trouble. The hard one is Huawei: chips, systems...(opens the original post in a new tab)
6 likes·Nov 28 14:14Collect
- X@aierjpAnthropic published the story of moving the Messages API from Python to Rust in its 11/25 engineering blog. It is not a new user-facing feature. ・From early 2024 to fall 2026, the API…(opens the original post in a new tab)
2 likes·Nov 28 14:14Collect
- X@AITrendFoxAI rebuilt its own foundation 🦊 Claude developer Anthropic published on 11/25: it used Claude itself for the migration of Claude's core API (Python→Rust). ・The first version was created in about a week. ・Processing load was reduced by about 70%. ・The start of responses was about…(opens the original post in a new tab)
- X@yui499509013892I read that Anthropic rewrote the Messages API in Rust and cut CPU usage by 70%. News about improving model performance tends to dominate what I see, but I kind of like the steady, behind-the-scenes work of optimizing infrastructure. Intelligence and efficiency…(opens the original post in a new tab)
1 likes·Nov 28 14:14Collect
- X@jianye43666769Claude wrote the core Rust path of the Messages API in a week—sounds amazing. Anthropic itself put the more sobering numbers later: in April this year the test pass rate was about 98%, but on production traffic, matching inputs were initially only about a quarter. This API is…(opens the original post in a new tab)
1 likes·Nov 28 14:14Collect
- X@tanielyoyoAnthropic just migrated its Messages API from Python to Rust — and had teams of Claude agents track down the difference…(opens the original post in a new tab)
1 likes·Nov 28 14:14Collect
- X@akirame558746⑤ Anthropic migrated the Messages API from Python to Rust using the Claude agent. CPU and memory usage were greatly reduced, and it explained that the hard part was validation in production. https://t.co/3pigazAJfP(opens the original post in a new tab)
Attention trend
New sources per day
- Nov 25: 1 new sources (1 outlets, 0 accounts)
- Nov 26: 253 new sources (2 outlets, 251 accounts)
- Nov 27: 86 new sources (1 outlets, 85 accounts)
- Nov 28: 36 new sources (0 outlets, 36 accounts)
- Nov 29: 0 new sources (0 outlets, 0 accounts)