NewsCrawler.org

Anthropic details Claude-assisted Rust migration of Messages API

Anthropic details Claude-assisted Rust migration of Messages API
Image: unite.ai

Anthropic reported on 25 November 2026 that Claude agents helped move its Messages API from Python to Rust without an outage or a freeze on feature development. Per-request CPU use fell about 70% and memory use more than 80%, while the median wait for the first response token fell about 20% for customers' Claude Code requests. An early Rust rewrite of output parsing had cut CPU use by about 8% to 10%, but each token then crossed between Python and Rust three times, so the team concluded the overhead was not worth it.

Claude wrote the first version of the core request path in about a week, but proving behavioral parity with a Python service that kept changing was the main work. The existing suite of about 700 integration tests was tied to Python, and Claude edited both code and tests, so an audit found more than 100 weakened assertions. In April 2026 the Rust API passed about 98% of its tests, yet only about a quarter of compared production inputs matched Python.

The team used the live Python service as the reference and replayed each model output to Rust, comparing processing on both sides of the model call, from request validation through tokenization[1] to usage counting, without reading customer content. Mismatches were grouped by a fingerprint[2] that records the first differing position and the length difference. Engineers reviewed each pull request before its fix moved to an outer check that compared traffic through shadowed production traffic[3] on versions with and without the change. A chart shows the match rate for compared inputs reaching 99.6% by August 2026, and public traffic moved to Rust in September 2026.

Anthropic shares (ANT)

82.33 USD 0.0% since the news day, November 25

Close on November 25 Quotes: CNBC

Read the original unite.ai

Sources

  • Unite.AI

    Anthropic Details Claude-Assisted Rust Migration of Messages API

    3 more outlets

Published: First seen: Читать по-русски

Open as a page