TL;DR
Anthropic platform engineering lead Katelyn Lesse discussed how the company rebuilt the Messages API from Python to Rust in about five months. The team used Claude to help engineers learn Rust and compared the new service with the existing API against production traffic; the source does not establish that the rewrite has been independently evaluated or that all agent-led practices are broadly deployed.
Anthropic rebuilt the Messages API that serves Claude requests from Python to Rust in about five months, platform engineering lead Katelyn Lesse said in an interview about how the company develops software. The account describes a major infrastructure change and a workflow in which engineers used Claude to help with Rust while checking the replacement service against the existing API on production traffic.
Get business pricing on monitors, keyboards and dev gear
- Business-only prices and quantity discounts
- Tax-exempt purchasing
- Multiple users, one account, clear invoices
The Messages API handles requests for Claude through products including Claude Code and Claude Desktop, according to the episode description. The service performs authentication, tokenization, billing and safety checks before calling the GPU stack to generate tokens. Anthropic initially optimized its Python monolith, but the team found that its CPU overhead remained substantial and chose to rebuild the service in Rust.
Lesse said the rewrite took a few engineers and about five months, even though the team did not include Rust experts. Engineers used Claude to help them learn the language during the project. Rather than relying on strict code review as the main safeguard, they ran the Rust implementation alongside the Python API and iterated until the two produced identical responses, the account says.
Lesse estimated that engineers examined closely about 20% of the generated code. She argued that code can be reviewed through its behavior when a system can be made verifiable. That is her description of the team’s process, not an independently reported measurement of code quality. The episode also describes an automated Claude-based pull-request classifier that can route reviews and assess whether human review is needed, plus an agent that has begun categorizing API on-call alerts before a person responds.
How Anthropic Builds Software In 2026
Katelyn Lesse described how Anthropic rebuilt its Messages API from Python to Rust, using Claude to support engineers and production traffic to compare the new service with the existing one.
Why the team changed languages
Python suited a small research focused team, but CPU overhead remained substantial as the service grew.
- Familiar to researchers
- Connected readily to inference systems
- Optimization did not resolve CPU concerns
- Chosen to address CPU overhead
- Claude helped engineers learn Rust
- Built by a few engineers, without Rust experts
How the rewrite was checked
The team compared the replacement service with the existing API before making it authoritative.
The Rust service was checked against the existing API on production traffic.
The team iterated until both services produced identical responses.
Lesse said verifiable behavior helped focus review without examining every line.
Where Claude enters the workflow
The account describes assistance with engineering work and early agents that help route attention.
Rust learning support
Engineers used Claude while learning the language during the rewrite.
Pull request classifier
An automated classifier can route reviews and assess whether human review is needed.
Alert categorization
An agent has begun categorizing API on-call alerts before a person responds.
What the account leaves open
- No measured CPU savings, latency changes, or operating cost reductions are provided.
- The scope and duration of shadow testing, including edge case coverage, are unspecified.
- Agent accuracy, safeguards, and how much human work they replace are not reported.
How Verification Supported the Rewrite
The migration illustrates a practical trade-off for a company serving a rapidly growing AI product: Python’s development convenience had helped the early API connect with research and inference systems, but the service’s CPU costs eventually prompted a move to Rust. The source describes performance overhead as the motivation; it gives no measured savings, before-and-after latency figures or cost reduction.
The reported testing approach also matters beyond the language change. Running the new API in shadow against the existing production service gave engineers a way to compare outputs before making the replacement authoritative. Lesse’s account suggests that Claude-assisted code generation was paired with behavioral checks, rather than being treated as proof that the generated code was correct. Other organizations considering agent-supported engineering would need to judge whether their own systems offer comparable ways to test changes and manage risk.
The interview’s discussion of review and on-call agents points to possible changes in how engineering teams allocate human attention. If agents can reliably handle low-risk changes or sort routine alerts, engineers may spend more time on changes requiring judgment. The source does not specify how often those agents make mistakes, what safeguards govern deployment, or how much human work they currently replace.
Products Worth Considering

Amazon Kindle Paperwhite (2024) – 16GB, 7 Glare-Free Display, Waterproof

DJI Mini 4K Drone with 4K UHD Camera

Bose SoundLink Max Portable Bluetooth Speaker, Black
As an affiliate, we earn on qualifying purchases.
Why Anthropic Started With Python
The episode account says Anthropic built the API in 2023, when it was still a research company with a small team and substantial overlap between research and engineering. Python was familiar to researchers and made it easier to connect the API to inference and other infrastructure. The choice was presented as fitting the team’s needs at the time, rather than as a mistake evident from the outset.
As request volumes and the service’s workload grew, the team found that CPU use was becoming a constraint. Lesse also described adding CPU capacity as difficult amid what the source calls a global CPU shortage. The team first optimized the Python service, then decided to rebuild it in Rust. The episode says OpenAI also moved an API from Python to Rust, but provides no comparative technical details or evidence that the two migrations followed the same process.
The supplied episode material identifies Lesse as Anthropic’s platform engineering lead and says she previously led engineering teams at Stripe. It presents the discussion as an account of the company’s engineering practices, not as a formal technical audit or a published comparison with other firms.
“As long as you can really boil something down to make it verifiable in some way, then you don’t have to look at every single line of Rust code that’s getting written.”
— Katelyn Lesse, Anthropic platform engineering lead
What the Account Does Not Measure
The source does not provide the exact episode publication date, detailed test results, production error rates or quantitative comparisons of CPU use, latency and operating cost before and after the rewrite. It says the services were iterated until their responses matched, but does not explain the full scope of traffic covered, the duration of shadow testing or how edge cases were assessed.
The account also does not establish whether the described review classifier and on-call agent are used across all Anthropic teams, how frequently human reviewers override them, or what their accuracy is. The source’s statement that an agent categorizes incoming API alerts first does not mean the agent independently resolves incidents. Its longer-term goal is described as having Claude handle more of on-call, but the material cuts off before setting out that plan in detail.
The episode text includes a claim that Anthropic had become publicly traded and had a market capitalization of around $1 trillion, but supplies no date, exchange or supporting source for that statement. It is not treated here as established fact. The source also lacks a year for its Thanksgiving scheduling note, so the episode’s precise date cannot be confirmed from the material provided.
Further Details on Testing and On-Call
The episode description says Lesse and her team published a technical deep dive on the Python-to-Rust migration on the same day as the interview. That write-up would be the next source for specifics about the migration’s design and validation, although the supplied material does not include its contents or a link.
For the on-call system, the next relevant development is whether Anthropic expands the agent’s role beyond categorizing incoming alerts. The account describes broader handling as a long-term goal, not a completed capability. The source gives no timetable for that expansion or metrics for deciding when the agent can take on more responsibility.
The episode itself was available through YouTube, Apple and Spotify, according to its publication note, with a transcript and timestamps provided on the episode page. No further release date or formal company announcement is included in the supplied material.
Key Questions
What did Anthropic rewrite?
Anthropic rewrote the Messages API, the service described as handling authentication, tokenization, billing and safety checks for Claude requests before they reach the GPU stack.
How long did the Python-to-Rust migration take?
Lesse’s account puts the rewrite at about five months, involving a few engineers. The source gives no more exact start or completion dates.
How did the team check the new API?
The Rust service ran in shadow alongside the existing Python API. The team compared responses and iterated toward matching behavior, according to the episode account.
Did Claude write the whole API without human review?
No such claim is established. The source says Claude helped engineers learn Rust and generate code, and that Lesse estimated engineers closely examined about 20% of the generated code. It does not say that no human review took place.
Is Claude handling Anthropic’s API on-call incidents?
The source says an agent has begun categorizing incoming alerts before a human. It describes broader incident handling as a long-term goal and does not say that the agent currently resolves incidents independently.
Source: newsletter.pragmaticengineer.com
