,

Katelyn Lesse: How Anthropic Rewrote Its Claude API in Rust in Months

Katelyn Lesse, Anthropic’s head of platform engineering, explains how her team moved the API behind every Claude token from Python to Rust in months and phased out coding interviews. In this episode of The Pragmatic Engineer, host Gergely Orosz walks her through the rewrite, the rebuild of Claude Managed Agents, AI code review, Claude on call, product managers shipping to production, and what is left of the software engineer’s job.

TLDW

Anthropic’s Python API monolith ran out of CPU as request volume spiked, so a small team rebuilt the whole layer in Rust in five or six months, mostly written by agents and verified by shadow traffic instead of line-by-line review. Lesse describes a company where a Claude classifier decides which changes need a human reviewer, Claude takes the first look at pages, agents fix red CI on their own, and a product manager shipped a production feature. Hiring has dropped the classic coding interview, leveling can no longer use project length as a stand-in for complexity, and her answer to the engineer identity crisis is to raise your ambition, because big multi-agent systems still need humans to build the security, auth and infrastructure underneath them.

Thoughts

The quietest bombshell in this interview is in the performance review section, not the Rust section. Lesse admits that the industry’s main yardstick for seniority, the size of the effort someone led measured in years, has broken. The Python to Rust migration is exactly the kind of project that used to justify a staff-level promotion by its length alone, and it took five or six months. So Anthropic falls back on impact (CPU saved, latency improved, incidents avoided, teams coordinated), which is the right answer but a much harder one to measure. Put this next to the hiring change, where candidates were failing the coding round while crushing everything else, and a pattern shows up: every signal the industry built to read engineers was calibrated to how long it took a human to type code. Those signals are all going soft at once, and Gergely Orosz’s closing prediction that hiring will become “a lot more subjective” applies just as well to promotions. Anyone whose resume leans on duration should start describing outcomes instead.

The Claude Managed Agents story says more about the new economics than the Rust rewrite does. The team had already shipped both the API and the Claude Code web experience in early beta on a simple design (boot a sandbox, boot Claude Code inside it), hated its reliability, latency, security and CPU costs, and threw the whole thing out. The redesign put the harness on a durable server, spun up sandboxes only to run work, and injected credentials at egress through a proxy so they never sat inside the sandbox. It ended up using about a third of the CPU. Before agents, rebuilding a product midway through its beta was the kind of decision that ended careers. When implementation is cheap, the expensive mistake becomes keeping a mediocre architecture because you already built it. That is a bigger change to how teams should plan than any productivity percentage.

The headline “engineers stopped reading the code” is easy to misread. What Anthropic actually did was move rigor from review to verification. A thin Python front door sent each request through both systems, the team drove the difference rate down day by day, and Python stayed as a fallback until the Rust path was trusted. Because Anthropic does not look at customer prompts or completions, they could not even inspect the mismatches, so they compared everything up to the inference boundary and token counts on the way back. Rust’s strict compiler adds another check agents can iterate against. Even then, about 20% of agent pull requests needed engineers deep in the details. The lesson for everyone else is not “skip review.” It is that the work you can hand to agents is bounded by how well you can verify it, so building the harness that checks the output is now the most valuable engineering you can do.

One counterintuitive line deserves more attention: Lesse says the human hours spent on meta-work, building tooling that makes the work go faster, have gone up as more work became agentic. Anthropic has a central developer acceleration team (it built the company’s new source control system), a platform acceleration team that built the QA agents and the CI-fixing agents, and individual engineers who build their own tools because a bottleneck annoyed them. One engineer’s experiment with a Slack channel full of coordinated agents turned into a pattern for ambient work like scanning a codebase for vulnerabilities. Companies looking for the “agents mean fewer engineers” savings may find the time moves into the factory rather than disappearing.

Her answer to the identity crisis is better than the usual “learn to prompt” advice, but it comes with a catch. Her point is that fleets of agents curing diseases or running full legal diligence will not happen until humans solve the boring hard parts first: security, identity, auth and infrastructure. Otherwise, as she puts it, “bad problems” happen first. That is a concrete career map: go deep in the domains that sit under agents, not the syntax agents now write. The catch is the one Orosz raised. Most engineers do not work inside a frontier lab with every internal system wired to Claude through MCP servers and an unlimited token budget. Anthropic’s onboarding works because the agent can see everything, and that context, not the model, is the part most companies are missing. The cheaper ambition he describes, finally fixing bad airline and expense apps, is the more realistic starting point for most teams.

Key Takeaways

  • Every token Claude serves runs through the Messages API, which also powers Anthropic’s own apps. Lesse’s platform team owns auth, CPU, networking and sandboxing for those apps too.
  • The original API was a single-threaded Python monolith in one GCP region, chosen because the first product engineers came from research. Request spikes, including from a Super Bowl ad, made CPU hard to get from the clouds.
  • Anthropic picked Rust over Go, Java or C++ for top efficiency with memory safety. Few people on the team knew Rust, and models now handle most of the learning curve.
  • A new senior engineer pushed a “great leap” approach: fork the whole codebase into Rust at once, run shadow traffic through both systems, and drive the difference rate toward zero.
  • Engineers did not deeply read about 80% of the agent-opened pull requests in the rewrite. The other 20% needed hands-on debugging.
  • The rewrite took about five or six months with a small core team. Most of the human effort went into coordinating with other teams, plus lint rules forcing them to build new features in both Python and Rust.
  • Claude Managed Agents was rebuilt from scratch after early beta: a durable server for the harness, sandboxes on demand, separate session storage, and credentials injected at egress. It uses about a third of the original CPU.
  • New hires learn the system by asking Claude, which can produce interactive diagrams, prose, or podcast-style explainers from the codebase.
  • Teams are still about two-pizza size but skew more senior, because everyone designs and coordinates while agents implement.
  • A Claude classifier runs on every change and decides whether it needs a human reviewer, how many, and from which teams. Mechanical changes like SDK version bumps can merge without a person looking.
  • A Claude shadows the API on-call rotation, decides whether a page is noise, and often has a diagnosis and fix ready by the time a human reaches a laptop.
  • A product manager built and shipped prompt caching diagnostics to the developer console. The team that owns a system still gets paged and stays accountable, whoever or whatever made the change.
  • Coding interviews were phased out across product and platform teams. Anthropic is testing agent-based replacements, like reviewing agent-written code or building something with a coding agent.
  • Levels, promotions and reviews remain, but project duration no longer works as a proxy for complexity, so impact carries more weight. Peer feedback at Anthropic is mostly transparent.

Chapters

3:09 From Betterment and Stripe to Anthropic

Lesse switched from chemical engineering to computer science after an intro class, then spent about seven years at the robo-advisor Betterment, where she moved into management early on a new 401k team. She joined Stripe to work on Stripe Capital, its lending business, drawn by its engineering-led culture. At Stripe she lived through a debate over writing new V2 API services in Java or Ruby. The team stopped partway and went back to Ruby, because learning Java would have taken years.

7:04 How the Claude API Works Under the Hood

Inference runs on accelerators at the bottom, and the platform sits directly above it. A request hits auth services, then a multi-region, multi-cloud CPU cluster that handles tokenization, billing and safety checks before the tokens reach the GPUs and come back. Unlike Stripe’s APIs, requests can stay open for up to about an hour. Because chats are stateless, the whole conversation travels over the wire on every turn, and the team has worked to make that more robust.

10:21 Why Anthropic Rewrote Its Python API in Rust

The API began as a Python monolith built by a tiny team that overlapped with research, which worked in Python. Request volume spiked, and the CPU cluster got crunched. For the first time in Lesse’s career, getting more CPU from the clouds was a hard conversation. Adding regions and finding smaller savings bought time, then one engineer argued for Rust. Go had been the earlier compromise between speed and developer experience. Rust won once models were good enough to cover the team’s lack of Rust experience. Lesse estimates the model writes about 75% of the code with no need to know the syntax, and engineers dig into the rest because they want to understand it.

23:40 Shadow Traffic Verification Without Seeing Customer Data

Instead of carving off pieces one at a time, the team forked the whole system into Rust and ran every request through both. Since Anthropic does not look at prompts or completions, they compared everything up to the inference layer and matched token counts on the way back out. They pushed the difference percentage down day by day. After rollout, a Python front door stayed in place as a fallback for any request the Rust system rejected, until the team was confident enough to remove it. One surprise came when a beta feature went GA on the Python side only, flooding the shadow system with mismatches. That led to lint rules requiring new features in both languages.

31:11 Onboarding by Asking Claude

The Python system never had good documentation, so the code itself serves as the documentation for agents. New engineers now ask Claude how the system works and get whatever format suits them: an interactive app they can click through, prose, or something like a podcast. Every internal system has an MCP server, so Claude can search what it needs, though Lesse says most of it comes from the codebase. She argues that language choice barely matters anymore. Engineers who loved the craft of a language can still find deep work on languages and frameworks themselves.

44:35 Building and Rebuilding Claude Managed Agents

Claude Managed Agents adds higher-level APIs to define an agent and run sessions, sharing infrastructure with Claude Code on the web and mobile. The first design booted Claude Code inside a sandbox per request. That had four problems: a dead sandbox killed the agent, boot time added latency, credentials sat next to the model, and every session burned at least one CPU. The rebuilt Go services fixed all four. Lesse notes that when she joined, the API team was about 30 engineers barely keeping up with model launches, so the idea had waited for both headcount and cheaper implementation.

53:59 Two-Pizza Teams, Slack Agents, AI Code Review and Claude On Call

Engineers use Claude Code and other Anthropic tools for hands-on ideation. For cloud agents they use a system similar to Claude Tag, which treats Claude as one assistant across Slack rather than a crowd of agents with separate identities. The unit of work is now a project, not a pull request. Agents spawn subtasks and report back in Slack, and they sometimes offer to ping another team. A Claude classifier routes every change to zero or more human reviewers, and the share that needs none is “ratcheting up.” On the API on-call rotation, Claude takes the page first, filters out noise, and starts diagnosing real incidents before a human arrives.

1:09:31 Product Managers in Production and Anthropic’s Software Factory

A technical product manager built the prompt caching diagnostics dashboard in the developer console with his Claude in Slack, with engineers available to review. Ownership has not changed: the team that owns a system gets paged, even when the change came from a PM or an ambient agent. Anthropic does not use the term “software factory” internally, but Lesse says the spirit fits. Agents write changes, verify them, review them and deploy them, and QA agents keep testing production against human-written specs. Two acceleration teams build much of this tooling, and individual engineers build the rest.

1:24:13 Phasing Out Coding Interviews and Rethinking Levels

Interviewers kept overlooking poor coding-round results from candidates who excelled everywhere else, so Anthropic stopped relying on that round. It is testing agent-driven formats while keeping the system design and past-project interviews. A good interview also needs to be trustworthy, easy to grade and resistant to bias, which is why there is no single replacement yet. Everyone is a member of technical staff with numeric levels, and the company skews senior. Leveling now weighs impact over project length.

1:33:21 The Software Engineer Identity Crisis

Lesse says the engineers struggling most built their identity on typing code, while people who love solving ambitious problems have more to do than ever. Her examples include agents helping assemble FDA submissions and an AI legal customer moving from contract review to full diligence. Orosz compares it to civil engineering: skyscrapers still need maintenance, and the first one led to many more. Lesse points to MCP, which engineers on her team created, and early work on connecting agents to lab equipment and robotics as signs the problems are just starting. Her book pick is Project Hail Mary, a story about a human and an alien learning to communicate, which she finds relatable to working with AI.

Notable Quotes

“You can trust much more that as long as you are really clear about the intent that you have with what you want code to do, that the model will write the code better than you probably would have yourself.”

Katelyn Lesse, on learning Rust alongside the models

“As long as you can really boil something down to like 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, on the shadow traffic rewrite

“I think the average engineer is spending so much more of their time on that type of coordination work and much of course much less on actual implementation.”

Katelyn Lesse, on where engineering time goes now

“Someone might not pass that coding interview, but they would like crush all the rest of the interviews and it’s cuz they’re not writing code by hand all of the time anymore.”

Katelyn Lesse, on why Anthropic phased out coding interviews

“If I get to a performance review time and I tell you something, some bit of feedback that feels super surprising to you, then I messed up.”

Katelyn Lesse, on her management philosophy

“If you raise the ambition level, there’s still work that engineers are going to have to do in order to enable that elevated ambition.”

Katelyn Lesse, on the engineer identity crisis

“My take is that most companies will drop the coding interview eventually, but in return, the hiring process will become a lot more subjective.”

Gergely Orosz, in his closing takeaways

Watch the full conversation here.

Related Reading