Real Alpha
Try Pro free

News· The long read

Anthropic's Lesse says Rust port cut Messages API CPU about 40 to 50%

How to try the same port on one service, and what Anthropic's own postmortem says checks can miss

Playing · Latent Space

Katelyn LesseHead of Engineering, Anthropic

From How Anthropic ships the #1 LLM in the World — with Katelyn Lesse and Angela Jiang, on Latent Space

The short version

Anthropic’s Rust port cut Messages API CPU by a ballpark 40 to 50%, Katelyn Lesse said.

She said the plan and the checking mattered most, and Anthropic’s April postmortem shows what checks can miss.

Try the method on one service with a clean input and output, and report reverts instead of code share.

A few times below open the interview at that second.


Anthropic’s Rust port cut Messages API CPU by a ballpark 40 to 50%, Katelyn Lesse said on Latent Space 58:48. She runs engineering for Anthropic’s platform, and her starting team had no Rust developer. Claude wrote the code, she said, and time to first token improved about 10 to 20%.

Anthropic sells Claude and has filed to sell shares, so treat this as a seller’s account. Below are six steps to copy, each with its evidence, its catch and what to do this week.

Table of six steps for porting a service with agents, the evidence for each and what it has shown.
What each step has shown so far. Most of the results are self-reported, and three steps have no measured saving at all.

1. Pick a service where the language is the waste

Lesse called the old Python monolith “very CPU inefficient” 56:27. I read the saving as mostly Rust’s credit rather than Claude’s, since leaving Python saves CPU whoever types the port.

Cloudflare’s 2022 rewrite left C and Lua rather than Python, with no AI involved. Its Rust proxy used about 70% less CPU than the old service under the same traffic. The catch is that Cloudflare changed the architecture too, and credits that as well.

Lesse credits Claude with time and staffing. She gave rough bounds, from talks earlier this year to full rollout a week before she spoke. She said the old way “would’ve taken years and years and years”.

  • This week. If CPU limits you, profile your three costliest services for runtime overhead. Mark which have a clean input and output.

2. Let an agent type, and keep people on the design

“the plan to do the thing, and then the verification of the thing”

Katelyn Lesse, on the two things that mattered most

Humans designed the system, she said, and the writing itself was “like, Claude writing code” 57:16. The team also hired a couple of people with more Rust experience. She gave no team size, token bill or incident count.

Google’s migration paper says 80% of the code changes in one ID migration were fully AI-authored. Its engineers estimated a 50% cut in total time. It calls itself an experience report with no comparison, and engineers still reviewed and landed the changes.

Airbnb moved about 3,500 test files in six weeks, against its own estimate of 1.5 years. About 97% went by machine, and the last 3% took about a week by hand.

Those were test files, with no live traffic at stake. Both reports show speed rather than who should own the design.

  • This week. Write one page on what must stay identical, and name who owns the design. Line up one person who knows the target language.

3. Build the check before you trust the code

Quote card of Katelyn Lesse saying her team built a full fork of the API in Rust and ran shadow traffic through it
Lesse on Latent Space describing the check behind the port. Take the method from this, since real traffic could show whether the fork matched the old system.

The check was a full Rust fork of the API 57:26. Shadow traffic, a copy of live requests, ran through it, and the team compared outputs against the old Python system’s 57:26. Uber uses a similar check.

The catch is in Anthropic’s April 23 post. It covers three spring changes that hurt Claude Code, the Agent SDK and Cowork, two of them for weeks. The post says the API wasn’t affected.

One bug “made it past multiple human and automated code reviews,” the post said. It also passed unit tests, end-to-end tests, automated verification and staff use. Confirming the cause took over a week.

I read that as a warning about tests in general. The post names no shadow-traffic check, so this doesn’t test one.

Another was a prompt change with “no regressions in the set of evaluations we ran.” A broader eval later found a 3% drop. Anthropic’s fixes followed user complaints, so a machine check can also lag what users notice.

  • This week. Decide what counts as the same output. Plan a mirror of live requests that stubs writes, and log every difference.

4. Lesse says the port team added nothing and turned on slowly

The port team resisted the urge to add features or change the design 1:00:00, she said. Static analysis flagged new features that skipped the Rust side, while the rest of the API team kept building.

Re-architecture waits for the team’s next goal. The port itself went in whole, then got turned on slowly. I’d budget for the chase, since a small team had to keep up with everyone else’s features.

  • This week. Write down what the port won’t change. Plan the traffic steps, and how you’d roll back at each one.

5. Set review by how much a mistake can hurt

Lesse said that for a lot of code, “all you really need is just, like, a quick stamp” 1:24:04. She tied that to “a whole bunch of verification.”

For docs, copy and flagged additions, the Claude Code team’s post requires no human approval once automated checks are green. Ordinary product changes, plus caching and system prompts, need one person, who can be whoever directed the agent.

“we still require an engineer to review every PR”

Uday Kiran Medisetty of Uber

That holds for now, he said, since “the cost of an incident for Uber is like really high”. I read the split as two bets on how fast a mistake can be undone. Anthropic also sells Code Review, so treat its view as a seller’s.

Faros AI’s 2026 report, on 22,000 developers, compares each firm’s lowest and highest AI adoption. PRs with no human or agentic review rose 31.3%, and incidents per PR rose 242.7%.

Faros sells analytics, and one PR can link to several incidents. Both rose with adoption, with no test tying them.

Table comparing how Anthropic, Uber, Vercel and Warp say they review and check AI-written code
What Anthropic and Uber require, beside what Rauch and Lloyd said, from their interviews and Anthropic’s posts. The Claude Code team and Uber split on low-risk changes.
  • This week. Set tiers by blast radius. Allow a stamp only on the lowest.

6. Report reverts and incidents instead of code share

Anthropic’s filing says over 90% of contributions to its codebase in September were written by Claude. Daily code per engineer last quarter was over 45 times the 2024 average. Both measure the step Lesse described as Claude writing code.

An Oct. 15 post counts something better. Merged PRs to Claude Code more than doubled from June to September. The share later reverted fell by more than 40%, with no base rate.

Sundar Pichai said Google’s version of the code share is “like meaningless” now.

Table of six Anthropic figures showing what each one counts and what it leaves out
Six figures from Anthropic’s filing, two posts and the episode. The filing’s count volume or revenue, and the last three are self-reported results.

Internal Claude use at list prices “first exceeded our monthly personnel expense, excluding stock-based compensation” in April, the filing says. Anthropic pays for compute rather than list prices, so your bill would start from a vendor’s price.

  • This week. Count last quarter’s reverts and incidents per merged PR. Work out token spend against payroll, at the price you pay.

Check these before you repeat her figure or the host’s

  • The ask. She gave the figure when asked for a ballpark, starting “I guess I would say”.
  • The scope. It covers ordinary CPU servers for the Messages API, not the chips that run models. She gave no base, and no share of the compute bill.
  • The timing. She spoke in September, about a week after full rollout, so the figure was young.
  • The test. The filing never mentions Rust, and write-ups I found only recap this episode.
  • The margin. Host Shawn Wang called a 19% margin GAAP. The filing labels it adjusted. GAAP was 8% that quarter and (3)% the next. The filing says $5.0 billion of short-term compute and $2.0 billion of non-cash donation charges primarily drove that.
  • The ratio. Wang opened with $6.6 million of revenue per employee, which leaves out compute. Revenue less compute over four quarters is $13,529 million, or about $2.6 million each across about 5,300 people, my sum.

A host raised Claude Code’s medium effort default. Neither guest mentioned April’s reversal of that setting, or the March outage in the filing. Lesse did say internal use alone “may not have caught” one model’s laziness 35:18.

“we may lack adequate testing, rollback procedures, or monitoring capabilities”

Anthropic’s filing, in a risk factor on catching problems from system changes

Three numbers to ask for instead of code share

Watch the 3 minutes where she gives the number.

By email

The best moments, twice a week

Wednesday and Saturday at 7:00 in New York.

Long reads also go out by email. Get them at read.realalpha.app