Anthropic’s Messages API now uses about 70% less CPU per request than the Python service it replaced. Claude wrote the first version of its core request path in about a week, and the team switched over without taking the service offline (Anthropic’s Rust migration write-up). The week of code generation was the short part. Proving the new code behaved like the old code took far longer.
OpenAI published two stories in the same month with the same shape. A Codex-driven workflow has run more than 1,700 performance investigations on ChatGPT (OpenAI’s Performance Factory post). A Rust Git backend called Pando went from kick-off to production in 10 weeks and cut median push latency by nearly 5x (OpenAI’s Pando post).
If you lead a platform or infrastructure team, you have probably been asked whether agents could rewrite your slowest service. These three programs show what that took. This case study walks each one through the same frame: the context, what changed, what was measured, why the result does not carry over to every team, and what you can copy anyway.
Three Production Systems That Let Agents Write the Core
Each case starts with a system under load that its owners could not keep scaling the old way.
Anthropic’s Messages API
The Messages API is how customers and Anthropic’s own apps, including Claude Code and Cowork, reach Claude. From early 2024 to fall 2026, its traffic grew roughly 1,800 times (Anthropic). The team wrote it in Python in 2023. By late 2025, every request passed through validation, prompt transformation, tokenization and safety classifiers, and Python’s cost of creating objects, freeing memory and switching tasks added up on every one.
OpenAI’s Regression Workflow for ChatGPT
A ChatGPT latency regression can start with a deploy, a feature flag or a code change. Before Codex, OpenAI’s performance engineers had built up more than 30 performance tools to chase these regressions by hand (OpenAI Performance Factory).
OpenAI’s Pando Git Backend
OpenAI’s monorepo grew fast, and Codex multiplied the number of agents pushing and fetching at once. Starting around the end of last year, slow fetches, slow pushes and failed merges pulled reliability below 90% at times (OpenAI Pando).
What Each Team Changed
The three changes differ in size. One replaced a whole service, one automated a human job, and one put a new system in front of an old one.
Anthropic Moved from One Rust Parser to the Whole Request Path
Anthropic first tried a partial fix. It rewrote only the model output parser in Rust and called it from Python, which cut CPU use by about 8% to 10% (Anthropic). The catch was that each token now crossed between Python and Rust three times. The added complexity was not worth that gain.
By May 2026, Claude was writing more than 80% of the code Anthropic merged. So the team chose a full rewrite of the request path in Rust, with Claude drafting it (Anthropic).
OpenAI Turned Manual Investigations into a Regression Workflow
OpenAI turned the investigation job into a workflow with six steps (OpenAI Performance Factory):
- The system detects a regression.
- An agent finds the root cause.
- An agent proposes a fix.
- An engineer reviews and deploys it.
- An agent verifies that the metric recovered.
- The task is marked resolved, or goes back to investigation if the metric is still down.
The team wrote its investigation habits into a shared skill called perf-forensics. It tells Codex which tools exist, when to use each one and how to work through a slowdown.
OpenAI Put Pando in Front of Its Old Git Servers
Pando is a new Git backend, written in Rust, that keeps the Git protocol and clients unchanged. One engineer designed its core, teams of agents implemented it, and a handful of engineers deployed it (OpenAI Pando). It went live as a read- and write-through proxy in front of the existing source control system. The two stayed in sync, so traffic could move to Pando without downtime, and its caches filled as traffic moved. It has served production traffic since April 2026.
The Mechanisms That Made the Numbers Possible
The headline numbers depend on checking machinery each team built.
Shadowing Production Without Reading Requests
Anthropic had about 700 integration tests, and they were tied to the Python implementation. An audit of the ported tests found more than 100 weakened assertions (Anthropic). Tests could not cover every case either: 20 binary options alone make over a million combinations.
The gap showed up in April. The Rust API passed about 98% of its tests, yet only about a quarter of inputs matched on production traffic (Anthropic). A bug that counts once in a test suite can fire on many real requests. One example: Python escaped characters such as emoji into text codes inside JSON tool calls, while Rust wrote them as is, so prompts differed by a few bytes.
The fix was shadowing. Production called the model once and replayed its output through the Rust path, comparing every step before and after the model call. The team never read customer requests or Claude’s replies. It recorded only the shape of each difference:
- Checkpoints marked the first stage and prompt section where the two versions split.
- Fingerprints stored the byte position where a difference began and the change in length, so one bug left one fingerprint across many requests.
Three Verification Loops and a Human Gate
Every 10 to 30 minutes, a script grouped difference records by field and alerted a coordinating Claude agent only when a new kind appeared (Anthropic). The coordinator assigned a worker agent to each new kind and opened a Slack thread for it. Each fix then went through three loops:
- Inner loop, in a sandbox: the agent held both codebases and wrote its own requests to reproduce the bug. Input checks skipped the model call and took under a second.
- Outer loop, in production: an engineer reviewed the pull request, the fix deployed, and the team compared fingerprint rates between builds with and without it.
- Memory loop: corrections from review were stored and applied to every later agent. In June, an agent read about 60 review comments, grouped the repeats and proposed rules that an engineer edited into
CLAUDE.md.
Those rules later hardened into tests, lints and a merge check: change the Python code, and you had to make the matching Rust change or request an exemption. The engineer still mattered. In mid-May, an agent proposed copying the web search tool’s description into files Rust could read. The fix passed local checks, and an engineer rejected it because it did not solve the problem.
The Performance Factory’s Four Parts
OpenAI’s Regression Workflow runs on a general system with four parts (OpenAI Performance Factory). A task tracker holds configurable workflows. A dispatch loop hands ready work to agents. An internal API runs Codex turns in the cloud. Subscriptions wake agents when something changes, such as a review comment or a failed CI check on a pull request.
Each task records its state and findings outside the agent, so work passes cleanly between agents and engineers. A separate Codex session then tries to disprove every diagnosis. In one case, an agent blamed image download errors for failing ChatGPT conversations. The reviewer saw that the file location service had already recovered while image requests kept failing, and reopened the investigation.
Pando’s Consistency Bet and Its Test Harnesses
Pando updates each branch independently, so pushes to unrelated branches run in parallel. It reuses packfiles, Git’s compressed bundles of objects, across fetches (OpenAI Pando). To scale writes, it gives up repository-wide consistency for causal consistency. A client reading several branches may see them at different points in time.
Agents worked against three safety nets. A conformance test suite checked changes against standard Git behavior. The team also built deterministic simulation testing harnesses. And agents using GPT-6 Astra wrote Lean and TLA+ to formalize a “theory of Pando”, which helped find bugs and prove properties.
The Measured Results and How They Were Checked
The table below pairs each program’s published result with how the owner measured it. All figures come from the three primary sources dated November 2, 19 and 25, 2026, as linked in the sections above. None is an independent benchmark.
| System | Owner | Change | Measured result | How it was verified | Source |
|---|---|---|---|---|---|
| Messages API | Anthropic | Python service rewritten in Rust, drafted by Claude | About 70% less CPU per request; median time to first token about 20% lower | Production shadowing with checkpoints and fingerprints; three verification loops | Anthropic, Nov 25 |
| Regression Workflow | OpenAI | Manual performance investigations moved to a Codex workflow | 1,700+ investigations and 600+ root causes in just over three months | Adversarial Codex review; manual grading of 100 root cause suggestions | OpenAI, Nov 19 |
| Pando | OpenAI | Legacy Git servers fronted, then replaced, by a Rust backend | Median push latency nearly 5x lower; nearly 1 PB of Git data per day | Conformance suite; deterministic simulation; Lean and TLA+ models | OpenAI, Nov 2 |
Anthropic reports about 70% less CPU per request and about 20% lower median time to first token (TTFT), the wait before the first output token arrives. It reached both without taking the service offline or freezing feature work (Anthropic).
OpenAI’s Regression Workflow tracked more than 1,700 investigations and root caused over 600 cases in just over three months. That works out to 17 automated investigations a day (OpenAI Performance Factory).
Pando cut median push latency by nearly 5x in production and now delivers nearly a petabyte of Git data per day. Its packfile cache hit rate is over 99% (OpenAI Pando).
Why the Results Do Not Transfer to Every Team
Each result rests on assets that most teams do not have.
The Test and Tooling Debt Was Already Paid
Anthropic started with about 700 integration tests, and even those hid more than 100 weakened assertions after porting (Anthropic). OpenAI’s performance team had already built more than 30 tools before Codex arrived (OpenAI Performance Factory). Pando’s agents had a conformance suite to test against. A team with thin tests gets the fast draft and none of the checks.
Scale Made the Investment Pay
Traffic that grew 1,800 times makes a per-request CPU saving worth a full rewrite (Anthropic). Pando was built for a monorepo moving nearly a petabyte a day (OpenAI Pando). On a single repository with a small team, the same push speedup saves far less time, and the rewrite costs about the same.
Shadow Traffic and Proxies Need Infrastructure
Shadowing needs replayable production traffic and logging that records difference shapes without reading user data. Pando needed a proxy that could sit in front of live source control and keep two systems in sync. For many teams, either one is a project of its own.
Automated Diagnosis Is Right Most of the Time, Not All of It
In a manual review of 100 root cause suggestions, OpenAI graded 70% as accurate. The other 30% needed more work or did not fully establish causality (OpenAI Performance Factory). Note the shared number: Anthropic’s 70% is a CPU saving, while this 70% is a diagnosis hit rate. A team without adversarial review or a human gate would ship those misses.
Relaxed Consistency Is a Product Decision
Pando’s speed depends on causal consistency, so a client reading several branches can see different moments (OpenAI Pando). That trade fits OpenAI’s workflow. It may break release tooling or audit processes that assume one repository-wide snapshot.
Primary Sources Behind These Case Studies
Every number in this article comes from one of three engineering posts. Each describes the owner’s own systems and traffic.
- Anthropic, “Migrating our Messages API to Rust”, published November 25, 2026: anthropic.com/research/migrating-api-to-rust
- OpenAI, “How OpenAI’s Performance Factory keeps ChatGPT fast”, published November 19, 2026: openai.com Performance Factory post
- OpenAI, “Scaling Git at OpenAI”, published November 2, 2026: openai.com Pando post
What to Copy from Three Agent-Built Systems
In all three cases, agents wrote the code fast, and each team spent its effort on comparison with production behavior, on review and on a named human who decided what shipped. You can copy that pattern without copying the scale.
Run This Quarter
- Count the integration tests your team would trust to judge a rewrite, then audit a sample of their assertions for checks that were loosened over time.
- List the request fields your service already logs, and sketch a shadow comparison that records where outputs differ without storing user content.
- Name the engineer who approves each agent-written fix, and write that gate into your pull request template.
- Add every repeated review correction to a rules file such as
CLAUDE.md, and turn any correction that appears three times into a test or lint.
Recheck After the Next Deploy
- Grade 100 past root cause suggestions from your own incident tracker before you let an automated pipeline open fixes.
- Compare CPU per request and median time to first byte on your dashboards before and after any rewrite, and publish both numbers to the team.
- Measure push and fetch latency against your current Git server for a month before you move a repository to a new backend.
- Check which of your release scripts read several branches at once before you accept any source control system with relaxed consistency.
