Anthropic’s head of engineering, Katelyn Lesse, says a Claude-assisted rewrite of the Messages API in Rust reduced CPU use by roughly 40–50% and improved time to first token by 10–20%. She described the work in an October 27, 2026, Latent Space interview with Anthropic product leader Angela Jiang.
Claude wrote much of the implementation, according to Lesse’s account, while engineers designed the system and checked its behavior using shadow traffic. A secondary reconstruction by explainx reports that the Rust version had completed its production rollout by the interview.
The useful lesson is the division of responsibility. Anthropic describes handing substantial implementation work to an AI coding system while keeping architecture, compatibility checks and deployment decisions with engineers. That is a more transferable pattern than the headline percentage alone.
What the Performance Figures Actually Mean
Lesse’s reported gains concern the Messages API service layer. The interview segment indexed by Real Alpha identifies both the CPU reduction and the improvement in time to first token.
These are estimates from an Anthropic executive, not independently validated benchmark results. The available sources provide no published benchmark methodology, workload description, latency percentiles or comparable service configurations. That limits how precisely another team can interpret the percentages.
| Reported metric | Lesse’s estimate | Practical meaning |
|---|---|---|
| Messages API CPU use | About 40–50% lower | Less CPU consumption in the API service layer |
| Time to first token | About 10–20% better | A shorter wait before the response starts arriving |
| Model generation speed | No separate result reported | The account supplies no measurement of subsequent token generation |
The distinction between API efficiency and model inference matters. An API service handles work around the model, including request processing and response delivery. Reducing that overhead can improve the customer’s wait for the first token without changing how quickly the model generates tokens afterward.
For illustration, a 10–20% reduction from a one-second baseline would mean a first-token wait of roughly 800–900 milliseconds. That is arithmetic, not an Anthropic measurement. The actual effect depends on the starting latency and workload.
Likewise, if the same workload previously consumed 100 units of CPU capacity, a 40–50% reduction would leave 50–60 units. That could materially ease a capacity constraint, but it cannot be translated directly into an equivalent reduction in Anthropic’s overall serving bill. The reported metric covers the API layer, not the whole inference stack.
I’d treat this as a promising service-efficiency result, with the cause still only partly explained. A rewrite can change data structures, concurrency and accumulated implementation choices alongside the language. Without profiling, the published account cannot tell us how much of the gain came specifically from Rust.
The Migration Playbook: Plan, Port, Shadow, Cut Over
The most detailed migration description comes from explainx’s reconstruction, which draws partly on translated reporting of Lesse’s remarks. Its procedural details are therefore secondary reporting, useful for understanding the approach but less direct than a published Anthropic engineering write-up.
That account describes five connected steps.

-
Humans defined the architecture and migration plan. Claude handled much of the coding, but engineers decided what the replacement needed to do and how to verify it.
-
A dedicated team built a complete Rust replacement. The project was treated as a port of the existing service, with the temptation to add features deliberately constrained.
-
The old and new implementations stayed aligned. Other teams continued adding features to the Python service. Static analysis helped ensure that a Python change prompted consideration of the corresponding Rust work.
-
Production requests were mirrored to the replacement. Shadow traffic let the team compare the implementations before putting the new service in charge of customer responses.
-
Traffic moved over gradually. The team increased the Rust service’s production role as the comparison supported moving ahead.
These steps address different failure modes. Architecture planning controls scope. Feature tracking limits drift between implementations. Shadow traffic tests behavior against real request patterns. Gradual cutover limits how much traffic depends on the replacement at once.
The static-analysis detail is particularly important. A long-running port has two moving targets: the replacement under construction and the original system still receiving changes. A replacement that matched last month’s API can still be wrong today.
For another team, the transferable requirement is explicit change tracking. Anthropic’s reported mechanism used static analysis; a smaller service might use migration labels, required review fields or shared compatibility tests. The tool can differ, but each change to the original needs an accountable decision about the replacement.
Why Shadow Traffic Is the Crucial Detail
Shadow traffic exposes a replacement to copies of real requests while the established service continues handling the live customer response. It gives engineers a way to investigate differences before those differences become customer-facing behavior.
That is especially valuable for an API rewrite. Compatibility includes more than accepting a valid request and returning a plausible answer. Clients can depend on error behavior, streaming structure and edge-case handling that are easy to overlook in a clean implementation.
The reported Anthropic approach compared the Python and Rust implementations for consistency. The published summary does not describe the comparison machinery, coverage thresholds or treatment of side effects.
For a team adapting the method, three questions deserve explicit answers:
- What must match? Define which fields, status codes, events and ordering guarantees are part of the compatibility contract.
- What can legitimately vary? Timing and nondeterministic model output may require different checks from deterministic request validation.
- What must never happen twice? Mirrored traffic needs controls wherever a second execution could create a customer-visible action, duplicate accounting or another side effect.
Those are implementation recommendations, not claims about Anthropic’s internal setup.
For a model API, comparing generated text byte for byte may be a poor parity test when output can vary. Teams need to isolate service behavior from permissible model variation. A request-validation mismatch and a different generated sentence are different kinds of evidence.
My view is that this validation boundary is the strongest part of the story. AI can help produce a convincing replacement quickly; confidence in a migration still depends on defining observable compatibility and investigating exceptions.
Frequently Asked Questions
4 questions
1Did Claude rewrite the API on its own?
No. Lesse says Claude wrote much of the implementation, while engineers handled architecture, planning and verification.