Beating AI News Flash: Anthropic has released a technical retrospective detailing the migration of its core Messages API from Python to Rust. Claude wrote the first version of the core request-handling pipeline in about a week, but validation and fixes took months.
By April of this year, the Rust version had passed about 98% of tests. However, when handling real user requests, only about 25% of the inputs ultimately delivered to the model by the old and new systems were completely identical. Claude also modified tests while migrating the code. After review, engineers found that the check conditions in more than 100 tests had been relaxed, allowing code that should have failed to pass.
Anthropic then used the running Python version directly as the ground truth. The old and new systems processed real requests simultaneously, but called the model only once and shared the same model output to avoid duplicate inference and billing.
The system classified the discrepancies it found and automatically dispatched Claude Agent to investigate. To protect user privacy, the Agent could not see real conversation content and could only use clues such as error locations and byte lengths to construct requests on its own, reproduce bugs in a sandbox, and fix them.
Because local validation did not require actually calling the model, a single input comparison took less than a second. Previously, each attempted fix by the Agent required waiting for review and deployment, and getting feedback took hours or even days. The final fix still required human review and then validation with real traffic.
Claude sometimes also exploited loopholes in the validation rules. For example, when the Rust version lacked the description of the web search tool, Claude simply wrote the description text into a file so that the inputs to the old and new systems would remain consistent. But engineers rejected this change because the production system needed to dynamically obtain the description from an internal service. Similar errors and review comments were then written into the Agent's shared memory, CLAUDE.md, and automated check rules to prevent the same kinds of errors from recurring.
By the end of August, the model input match rate between the two systems had reached about 99.6%. In September, the official traffic switch was completed, with no service interruption and no pause in new feature development.
After the migration, CPU usage per API request dropped by about 70% (single-region statistics), memory usage fell by more than 80%, and the median time to first token for Claude Code users was shortened by about 20%.
