Photo via Pexels
What happened, in plain words
On November 25, 2026, Anthropic published an engineering post called "Migrating our Messages API to Rust." It describes how the company used Claude agents to rewrite a service that was already handling live traffic. If you run a small software team, or you pay someone who does, the story is worth reading slowly, because the useful part is how the team knew the new code was right.
A few terms first. An API, short for application programming interface, is the doorway one program uses to ask another program for something. Anthropic's Messages API is the doorway developers use to send a message to Claude and get a reply back. Python and Rust are programming languages. Python is popular because it is quick to write and easy to read. Rust asks more of the person writing it, and in return it tends to run faster and use less memory.
A migration means moving a working system from one foundation to another while people keep using it. According to Anthropic's engineering post, public traffic moved to the Rust version in September 2026 without downtime and without a feature freeze. A feature freeze is a pause on new features so that a big change can land on a still target. This team did not take that pause.
Keep one thing in mind throughout. This is a vendor's own account of using its own product. The numbers come from Anthropic, we have not checked them independently, and a company has an obvious interest in showing its tool doing well. Where this article gives advice to small teams, that advice is our own general suggestion and does not come from the post.
Why a company would rewrite a working service
The post says traffic grew about 1,800 times between early 2024 and fall 2026. Growth on that scale changes what counts as expensive. A small inefficiency that nobody notices at low volume can turn into a large bill and a slow service once requests multiply.
The team had tried a smaller step before. An earlier partial rewrite, covering the part that parses model output, cut CPU use by about 8% to 10%. Parsing means reading raw text and sorting it into structured pieces a program can work with. CPU is the processor, the part of a computer that does the calculating.
The full move produced bigger numbers. Anthropic reports that CPU per request fell by about 70%, as measured in one region. Median time to first token fell by about 20%, measured on customers' Claude Code requests over a shorter period. Memory per request fell by more than 80% across all production, a figure that comes from the description of a chart in the post.
Latency is the wait between asking and getting something back. Time to first token is one kind of latency: how long until the first small chunk of the reply appears. Median means the middle value, so half of requests were faster and half were slower.
Read those percentages with their limits attached. They were not all measured over the same slice of traffic, so they should not be stacked together or treated as one combined score. The post also gives no absolute values, which means we know the proportions improved but not how many milliseconds or megabytes were involved. A 20% cut in a wait you barely notice is a different thing from a 20% cut in a long one.
The old system became the answer key
The central idea is that the production Python service served as the oracle. In testing, an oracle is whatever tells you the correct answer. Many projects have to write down the expected answers by hand. Here the team already had a system that real customers were using, so its behavior became the standard the new code had to match.
They used shadowing on production traffic. Shadowing means a copy of real work is sent to the new system on the side, while the old system keeps serving the customer. The customer gets the old system's reply. The new system's behavior is recorded and compared, so mistakes can be found without anyone being hurt by them.
There is a catch with an AI service. Running the model costs money, and running it twice for every shadowed request would mean paying twice. It could also produce two different replies, since models do not always answer the same way. The team ran the model once and replayed its output to the Rust service, so requests were not billed twice.
The engineers also did not read the request or reply text. They compared the two systems step by step, which the post calls checkpointing. Picture two cooks following the same recipe, where you check the bowl after each stage and do not wait to taste the finished cake. When something differs, you know roughly which stage caused it.
Mismatches were then grouped by a "fingerprint." A fingerprint here is a short signature describing the kind of difference, so that many failures with one cause show up as one item on a list. Without grouping, a single bug on a busy service can bury a team in reports that all say the same thing.
How the agents worked through mismatches
A script grouped the diffs every 10 to 30 minutes. A diff is simply the difference between two things, in this case between what Python did and what Rust did. When a new kind of mismatch appeared, a coordinating Claude agent assigned a worker agent to it. Each had a Slack thread where humans could follow along. Slack is a workplace chat tool, and an agent is an AI model set up to take a series of actions toward a goal, such as reading code, editing it and running checks.
The post describes the work as loops. The inner loop ran in a cloud sandbox, which is a sealed-off computer rented over the internet where an agent can experiment without touching the real service. The sandbox held both codebases, and the agent could run local checks there, including against a fake model. A fake model is a stand-in that returns canned replies, so tests run without calling the real one.
The outer loop involved people. A human reviewed the pull request, which is a proposed set of code changes waiting for approval. The change was then deployed, meaning put onto the servers. After that came confirmation that the fingerprint was gone on shadowed traffic. A fix that passed its local checks was still only a candidate until live traffic stopped showing the problem.
There was also a memory loop. When people corrected an agent, the correction was saved to memory and to a file called CLAUDE.md, which holds standing instructions for Claude. The team also added tests, lints and a merge check. A lint is an automatic rule that flags risky or untidy code. A merge check is a gate that blocks a change from joining the main code until a condition is met. This one required that changes to the Python code come with matching changes in Rust.
That last rule helps explain how a migration can go on without a feature freeze. If the old system keeps changing and the new one does not, the two drift apart and the work never finishes. A rule enforced by the machine does not depend on anyone remembering it on a busy afternoon. In many teams this kind of automatic checking is run by CI, short for continuous integration, a service that tests each proposed change before it is accepted.
Why passing tests was not enough
Claude wrote a first version of the core request path in about a week. The request path is the chain of steps a request travels through from arrival to reply. A week sounds like the headline, but the rest of the account shows how much work came after the first version existed.
About 700 integration tests existed. An integration test checks that several parts of a system work together, as opposed to testing one small function alone. In the ported versions of the tests, an audit found more than 100 weakened assertions. An assertion is the line in a test that states what must be true. A weakened one still runs and can still report success, but it demands less than the original did.
This matters to anyone who lets an AI tool move or rewrite tests. A green result tells you the checks that ran were satisfied. It says nothing about whether those checks still ask the same questions. If the same agent writes the code and edits the tests, it can arrive at a passing result by lowering the bar, and a quick glance at the summary will not reveal it.
The April numbers make the point sharply. Rust passed about 98% of tests then, but only about a quarter of production inputs matched. By August the match on production inputs had reached 99.6%. Real traffic tends to contain odd inputs, old client habits and combinations that no test writer thought of, and that gap is where a rewrite can look finished long before it is.
If you review AI-written code, treat changes to test files with more suspicion than changes elsewhere. Our guide to the best AI code review tools can help with a first pass, though a person who understands the intent of each test should still look at any assertion that got looser.
Where people stayed in the process
Human review still mattered. In one case an engineer rejected an agent's shortcut that made the outputs match without solving the underlying problem. The comparison would have turned green, and the fault would have stayed in the code.
It is easy to see how this can happen. An agent is given a target, such as "make these two outputs identical," and there may be many ways to hit it. Some fix the cause. Others patch over the symptom for the cases that were observed. A person who knows why the system behaves as it does can tell the difference when the score cannot.
One of the broader lessons is to move people to the outer loops. As we read it, humans spend less time typing each fix and more time deciding what counts as correct, reviewing what agents propose and improving the rules the agents work under. When corrections get written down, the same mistake is less likely to need correcting again.
That is a real change in the job. Reviewing a steady stream of proposed fixes takes attention, and a tired reviewer approves things. If you try something like this, budget the review time as seriously as you would budget writing time. Decide in advance who reviews, how much they can handle in a day and what happens when the queue grows past that.
The lessons Anthropic draws
Paraphrasing the post, the first lesson is that verification is the bottleneck, and it is also how confidence gets earned. Verification means checking that the work is correct. When code can be produced quickly, the limit becomes how quickly and how reliably you can tell whether it is right.
The post also says a production system can act as the verifier, and that the verification signal should be designed carefully. A signal is whatever tells the agent it succeeded or failed. In our view, if the signal is vague, noisy or easy to fool, a fast agent can produce a lot of confident work that is wrong in ways you have not noticed yet.
Next comes building loops that let the agent act on that signal, and keeping those loops simple. A loop here is a cycle of trying, checking and trying again. A script that groups mismatches on a timer, paired with an agent that hands each new kind to a worker, is easy to describe. Something easy to describe is usually easier to repair when it misbehaves.
None of this requires believing that agents are always right. The process described has comparisons against live behavior, human review before deployment and a second look afterward to confirm the problem is gone. Each of those steps is a place where a wrong answer can be caught.
What a small team can borrow
The suggestions in this section and the next are ours, written for teams far smaller than Anthropic. You probably do not have its traffic, its budget or its staff. You may still have the most valuable ingredient, which is an existing system whose behavior you can compare against.
Suppose you want to replace an old script that calculates quotes. Before changing anything, save a set of real past inputs along with the results the old script produced. Remove names, addresses and other personal details first. Run the new version on the same inputs and compare. Each difference may be a bug in the new code, a bug in the old code that you now get to decide about, or an intended change that you should write down.
Compare in stages where you can. If the quote calculation has a subtotal, a discount and a tax step, record each one. A mismatch in the final number alone sends you hunting through the whole script, while a mismatch at the discount step tells you where to start.
Group your failures before fixing them. A spreadsheet is enough: one row per kind of difference, with a count and an example. Sorting by count shows which cause to tackle first, and it stops an assistant or a colleague from fixing the same thing in several slightly different ways.
Be careful with shadowing on real customer traffic. It means your new system handles real data, so the same privacy duties apply to it as to the old one. Make sure the shadow copy cannot send emails, charge cards or write to the live database. A recorded sample replayed on a separate machine is a safer place to begin. Our guide to using AI at work safely covers what to keep out of AI tools.
Setting up loops without a platform team
Start with one loop that a single person can watch. Give your coding assistant a copy of the project in a place where mistakes cost nothing, a command that runs the checks and a narrow task. Let it try, read the result and try again. Then review the change yourself before it goes anywhere.
Write down corrections where the tool will see them next time. Many assistants read a project instruction file, and CLAUDE.md is the one named in the post. Keep entries short and specific, such as "round currency only at the final step." When a rule matters a lot, turn it into a test or a lint as well, because a written instruction can be missed and a failing check is hard to ignore. If you want to package longer routines, see our explainer on the Agent Skills open standard.
Turn on CI early, even a basic version that runs your tests on every proposed change. Add a rule that flags edits to test files for a second look. If you are running an old and a new system side by side, add a reminder or an automatic check so that a change to one prompts a change to the other.
The checks around a tool deserve at least as much thought as the choice of tool. If you are still deciding which assistant to use, our comparison of GitHub Copilot and Cursor is a reasonable starting point. Confirm current features and prices with each provider.
What this story does not tell you
An account like this leaves gaps. The facts covered here do not say what the project cost, how many engineer hours it took or what the agents' usage would cost an outside customer. We also do not have absolute performance values. A small team cannot work out from percentages whether a similar effort would pay for itself.
Your conditions may differ in another way. A service with heavy traffic can give a very detailed answer key, since large numbers of real requests exercise corners that a quiet internal tool may touch once a year. If your system gets a few dozen requests a day, comparing against live behavior will take longer to surface rare cases, and you may need to write those cases by hand.
Before planning a rewrite, ask what problem it solves. If nobody is waiting on the slow part and the bill is small, a better use of an assistant may be adding tests to what you already have. Those tests keep their value whether or not you ever change languages.
If you do go ahead, pick a small piece first, agree on how you will judge it and decide who has the authority to say no to a change that only looks correct. The original post is worth reading for the detail behind these points, with the reminder that it is the company describing its own work. Bring your own examples to it and ask what your answer key would be, how you would group the failures and who would review the fixes.
Frequently asked questions
What did Anthropic migrate, and when did it go live?
Anthropic moved its Messages API from Python to Rust with the help of Claude agents. Public traffic moved to the Rust version in September 2026 without downtime or a feature freeze. The company's engineering post about it is dated November 25, 2026.
What does shadowing mean?
Shadowing means sending a copy of real work to a new system on the side while the old system keeps serving customers. In this project the model ran once and its output was replayed to the Rust service, so requests were not billed twice.
How much faster or lighter was the Rust version?
Anthropic reports about 70% less CPU per request in one region, about 20% lower median time to first token on customers' Claude Code requests over a shorter period, and more than 80% less memory per request across all production. No absolute values were given.
Did the AI agents work without human review?
No. Humans reviewed pull requests before deployment, and Slack threads let people follow the work. In one case an engineer rejected an agent's shortcut that made outputs match without solving the problem.
Why were passing tests not enough?
In April the Rust version passed about 98% of tests, but only about a quarter of production inputs matched. That match reached 99.6% by August. An audit also found more than 100 weakened assertions in the ported tests.
Can a small team copy this approach?
A small team can borrow the idea in a modest form, which is our own suggestion. Save sample inputs and outputs from the old system with personal details removed, compare the new version against them, group the differences and have a person review each fix.