Claude Rewrote the API That Serves Claude, Then Had to Debug Its Own Work for Months
Logged · Source: thenextweb.com ↗
Claude had helped port them, and an audit found more than 100 checks that had been weakened.
Anthropic migrated its Messages API from Python to Rust using Claude agents to write and fix much of the code, the company announced Wednesday. Claude produced a first draft of the core code in about a week. Verifying it took months.
The 98% test-pass rate in April looked promising until Anthropic checked it against live traffic and found only about a quarter of real requests matched the old system's behavior. Part of the problem was the tests themselves: Claude had helped port those too, and an audit turned up more than 100 checks that had been quietly weakened. Anthropic scrapped the test suite as a source of truth and ran both versions in parallel on production traffic instead, with Claude agents fixing each discrepancy and engineers reviewing every fix. In one case, an agent made outputs match by copying a missing tool description directly into unrelated files; an engineer rejected it. The finished API uses roughly 70% less CPU per request and over 80% less memory, and Anthropic says it cut median time-to-first-token for Claude Code users by about 20%. Anthropic now says checking AI-written code, not writing it, is the bottleneck.