Anthropic Migrates Messages to Rust Without Downtime

Anthropic announces that it has migrated its Messages API from Python to Rust without interruption, with code written by Claude in about a week. The company claims to have continued developing features without any downtime. To oversee this rewrite, its engineers compared both versions against real traffic.
Anthropic Redefines Control Rules
At Anthropic, engineers have gradually shifted from directly searching for discrepancies to defining rules and controls. According to the technical team, they initially launched Claude and searched for divergences themselves, before managing the agents and reviewing their proposals in Slack. As the system matured, their work transitioned to drafting rules and controls.
The division of responsibilities described by the company reserved the definition of acceptable outcomes for humans. Claude could choose its hypotheses, reproduce bugs, and decide how to fix them, then submit its work to reviewers. Engineers recommend simple circuits tailored to the model's capabilities; they attribute this autonomy to Claude's progress as well as their own learning in using it.
A memory retained errors, conclusions from human reviews, and results from agents to pass on to subsequent ones, Anthropic indicates. When an engineer rejected a web search shortcut, the agent recorded the rejection, its justification, and the correct fix. While test circuits resolved discrepancies individually, this memory improved the way they were handled.
Existing Tests Allowed Errors to Slip Through
The team had about 700 integration tests but deemed them insufficient: their coverage was incomplete, and their reliance on Python implementations could lead to false positives. Continuous code changes, confidentiality, and the non-deterministic nature of responses also complicated oversight. Frequent launches of features and models made the very definition of correct behavior fluid.
The main challenge, according to the engineers, was to establish that the new version behaved like the previous one, more than to produce its code. Their system executed the same request through both programs, then transmitted to an agent a report describing and locating the divergence, without client content. Each different request generated a trace: a bug could thus produce hundreds of thousands of very similar reports while maintaining confidentiality, the company assures.
Le brief IA que les pros lisent chaque soir
Les 7 actus IA du jour, décryptées en 5 min. Gratuit.
Inclus dès l'inscription : notre sélection des meilleurs guides & comparatifs IA.
Choisissez votre rythme
Gratuit · Pas de spam · Désabonnement en 1 clic
To make these traces actionable, Anthropic installed checkpoints to locate discrepancies in the code and fingerprints to distinguish bugs. Its engineers emphasize that production does not spontaneously provide the signals that proof assistants offer with failed tests or their names. They therefore recommend building precise indications of where behavior deviates.
Two Circuits for Testing Fixes
An internal rapid circuit provided agents with an isolated environment to experiment without risk. According to the company, receiving a request, analyzing its discrepancies, and proposing fixes took less than a second there.
This simulation remained imperfect: agents could test a hypothesis in seconds, but only with the requests they had drafted. The local setup did not always exactly replicate that of the real service. A slower external circuit thus compared Rust deployments with and without each fix to identify issues that had escaped the initial check.
Engineers believe that testing and formal verification can establish the validity of the steps taken by Claude. When these methods are no longer sufficient, they propose resorting to the production system itself to verify results.
Traffic Exceeded Initially Expected Capacities
Launched in 2023 as a relay for Python requests, Messages serves as the primary access point to Claude for both clients and Anthropic's internal applications. According to its engineers, its traffic multiplied by more than 1,800 between early 2024 and fall 2026, far exceeding what its initial design anticipated. The increasing integration of Claude into codebases also came with shared dependencies with Python libraries.
By the end of 2025, each request had to be validated, converted into instructions for the model, tokenized, and passed to security classifiers. In output, tokens were distributed among text, reflection, and tool calls. Python added overhead to each operation, according to the team, which quickly sought to improve service efficiency.
Out of caution regarding a production overhaul, engineers began by rewriting the slowest components. However, in their view, CPU savings did not compensate for the additional complexity of these partial changes. By May 2026, Claude was writing over 80% of the integrated code at Anthropic, a contribution that made a complete migration more feasible, the company claims.
The team believes that large software projects were previously difficult to justify given the necessary efforts and risks involved. With code writing becoming less lengthy and less challenging, they consider that the main constraint has shifted to verification.
Anthropic Claims Reduced Resource Consumption
On the now-used Rust version, Anthropic reports approximately 70% less CPU consumption per request and 80% less memory. The company also notes a decrease of about 20% in the median time before the first token.
Brief IA — L'actualité IA en français
L'essentiel de l'actualité de l'intelligence artificielle, décrypté et expliqué chaque jour.