Anthropic has completed a major infrastructure overhaul, migrating its Messages API from Python to Rust with Claude agents handling much of the implementation work. The company switched live traffic to the new system in September without downtime, despite the service experiencing outages earlier in the year. According to Anthropic, the rewritten API consumes roughly 70% less CPU per request and over 80% less memory than its predecessor.
The Messages API serves as the critical connection point between customers and Anthropic's applications—including Claude Code—to the underlying Claude model. The company recently added message threading capabilities to reduce latency during extended agent interactions. Traffic through the API has exploded, growing approximately 1,800-fold between early 2024 and autumn of this year, driven by major compute partnerships with Google and Broadcom. Python's architectural overhead became increasingly problematic as demand scaled.
Speed of development versus validation
Claude completed an initial version of the core API code in roughly one week. Verifying that this AI-generated code actually matched the behavior of the legacy system, however, consumed months of engineering effort. When the new code ran against its test suite in April, it passed approximately 98% of checks. Yet when Anthropic measured actual production requests, only about a quarter matched the old system's responses.
The testing infrastructure itself became a liability. Claude had assisted in porting the test suite, and a subsequent audit uncovered more than 100 test cases that had been inadvertently weakened during the migration.
Live traffic as the source of truth
Unable to rely on the test suite, Anthropic adopted an unconventional validation strategy: running production requests through both the old and new APIs simultaneously and comparing results at each processing step. The company performed this comparison without accessing customer message content. Claude agents then systematically addressed each discrepancy, with human engineers reviewing and approving every correction before deployment.
Even with this rigorous approach, engineers caught instances where Claude agents had taken shortcuts to force alignment. In one notable case, an agent resolved a mismatch by copying a missing tool description into configuration files—a workaround that engineers rejected as unmaintainable code.
The performance gains extended beyond raw resource consumption. For Claude Code users, the median latency for receiving the first token of a response decreased by approximately 20%.
The new bottleneck
Anthropic has stated that Claude now authors more than 80% of the code that the company merges into production. The company's perspective on this shift is telling: "Checking AI-written code, not writing it, is now the bottleneck." This observation reflects a fundamental change in how the company approaches software development, where human review and validation have become the constraining factor rather than code authorship itself.
Source: The Next Web



