Infrastructure & Security · Nov 26, 2026
AI-written migration cuts API CPU use by 70%; the bottleneck shifts from writing code to verifying it
Anthropic had Claude rewrite its Messages API from Python to Rust. The first version of the core request handling took about a week, but finishing the move to production took several months. CPU use per request fell by about 70% and memory use by more than 80%. The hard work moved from writing code to checking that it behaves the same as before
Seiichi Tanaka · Editor-in-Chief

Key points
- Anthropic had Claude rewrite the Messages API from Python to Rust. The first version of the core request handling took about a week to write, but finishing the move to production took several months (primary source: the company's own research page)
- CPU use per request fell by about 70% and memory use by more than 80%, so the same volume of requests can be handled on far fewer machines
- Anthropic's conclusion: when AI writes a large migration, the bottleneck shifts from writing code to verifying that the old and new systems behave the same way
Anthropic said on a research page that it had Claude rewrite the Messages API, the API through which it offers Claude to outside developers, from Python to the Rust programming language, covering everything from accepting a request to sending back the response. The first version of the core request handling took about a week to write, but matching the behavior of the old and new systems and completing the move to production took several months, from April to September 2026. After the rewrite, CPU use per request fell by about 70% and memory use by more than 80%. Anthropic's conclusion is that when AI handles a large migration, the constraint is no longer writing the code but verifying that the new code behaves the same way as the old code.
What it means for Japanese companies: IT departments at companies that have asked a systems integrator for an estimate on rebuilding a legacy core system should ask at their next meeting: "If AI writes the code, how will you verify that the old and new systems behave the same, and how many people and how many weeks will that testing take?" They should also ask that the estimate list the effort for writing and the effort for verification separately. Companies that do not run large systems of their own are not directly affected for now.
Anthropic's Rust rewrite: first version in a week, CPU use down 70%
What Anthropic had Claude rewrite was the part of the Messages API that runs from accepting a request to sending back the response. Every question that developers' and businesses' apps send to Claude passes through it. An outage there would affect users around the world, so this is the kind of work that would normally move slowly and carefully over many months.
According to Anthropic's research page, Claude took about a week to write the first version of the core request handling. Engineers then kept comparing the old and new systems on production requests and fixing differences, and public traffic finished moving to Rust in September 2026. After the rewrite, CPU use per request fell by about 70% and memory use by more than 80%. Rust is known as a fast language that uses memory efficiently, and the numbers fit that reputation.
A roughly 70% drop in CPU use means the same volume of requests can be handled with, roughly speaking, about a third of the computing power. For companies running APIs at scale, that translates directly into fewer servers and lower electricity bills.
The real bottleneck, according to Anthropic: verifying, not writing
What Anthropic stressed most in this case was not the speed or the savings but the shift in where the work lies. With AI writing the code, even a large migration takes little time to write. Anthropic concluded that the remaining difficulty is verifying that the new code returns the same answers to the same inputs as the old code, and fails in the same ways.
Verifying that a migrated system "behaves the same" is generally tedious, labor-intensive work. The old and new systems have to be compared not only under ordinary use but on rare, unusual inputs, on how they respond when errors occur and on how they behave under heavy load. Having AI write the code does not reduce this verification work. If anything, the faster the code gets written, the harder it is for the people verifying it to keep up.
This view also echoes recent weeks' news about AI and mathematics. Many AI-generated proofs are trusted only after their correctness has been machine-checked with a tool called Lean. In code migrations too, the deciding factor is becoming how to build the machinery for verification, not simply trusting however much code the AI has written.
What it means for rebuilding corporate systems
Until now, the cost and timeline of moving an old system to a new language or architecture have been set by how many hours developers spend writing code. Anthropic's case shows that AI can sharply cut the effort spent writing, but not the effort spent on testing and verification. Companies that outsource migrations need to look separately at which parts of an estimate shrink and which do not.
A second implication is that the reasons for migrating may change. If writing a first version takes only a week, it becomes easier to justify rebuilding a core system purely for speed or cost. Anthropic's roughly 70% cut in CPU use is one example of how large that payoff can be.
What could not be confirmed
According to Anthropic's research page, the original language was Python. To verify that the old and new systems behaved the same, engineers sent production requests to both, replayed the model's output into the Rust side and compared the results stage by stage. Public traffic finished moving to Rust in September 2026, and median time to first token fell by about 20%. The page does not say which Claude model was used, how many engineers were involved or whether API pricing will change, and none of these could be confirmed.
Editorial cartoon
