# Shadow-run the new operation: compare it with the old one on live cases before you switch

> Anthropic's rewrite passed about 98% of its tests, yet only about a quarter of live inputs matched at first. Here is how to shadow-run an agent-run process.

- Type: Technical
- Published: 2026-11-28
- Author: Sentynel
- URL: https://sentynel.ai/sygnals/shadow-run-the-new-operation/
- Language: en

On 25 November 2026 Anthropic published how it moved its Messages API from Python to Rust with Claude agents finding and fixing the differences. The new version "passed about 98% of its tests in April, yet only about a quarter of inputs matched on production traffic." **Tests check the cases you thought of. Live cases show you the rest. Before an agent-run process takes over from the current one, run both on the same live cases, let only the current one act, and compare.** This article lays out how to do that for an operation, not just for code.

## Tests describe the operation you remember

Anthropic had about 700 integration tests. Two things weakened them. They were written against the old implementation and had to change with the code; an audit of the ported tests found "more than 100 weakened assertions." And they could never be complete: the post notes that 20 yes-or-no options already make over a million combinations.

A business process has the same problem, with less code and more people. The test set for a new agent-run flow is usually the cases someone remembers: the standard order, the common complaint, the refund everyone knows. The cases that break it are the ones nobody wrote down because one person handles them quietly every Thursday.

**Same new version, two ways of checking it**

~98% (of its tests passed (April 2026)) → ~¼ (of production inputs matched the old version at first)

Source: Anthropic, "Migrating the Messages API to Rust", 25 November 2026. Figures as reported in the post.

The gap is not a failure of the people who wrote the tests. It is what live work looks like.

## What shadow running means in an operation

Shadow running means the new process receives every real case the current process receives, decides what it would do, and records it, but does not act. The current process still answers the customer, books the payment and updates the record. Then you compare the two.

Two details from Anthropic's setup carry over directly:

- **Only one side touches anything that counts.** They "had to ensure that a request only counted once toward a customer's limits and bill." In an operation: the shadow never sends the message, never moves the case stage, never issues the credit. If the shadow can reach a customer by mistake, it is a pilot, not a shadow.
- **Both sides work from the same input.** Because the model can answer differently each time, they "ran the model once and replayed the model output to Rust." In an operation: freeze a snapshot of the case (the message, the customer record, the order) and give the same snapshot to both sides. Otherwise you are comparing two different moments, not two processes.

## Five steps to set up the comparison

**Shadow run for an agent-run process**

1. Pick checkpoints — Where a decision is made
2. Freeze the input — One snapshot, both sides
3. Record the difference — Where and which way, not content
4. Group by kind — Alert only on a new kind
5. A person rules — Bug or intended change

1. **Pick the checkpoints.** Do not compare only the final outcome. Anthropic compared step by step, so it knew where a difference began. For a service flow, the checkpoints are usually: how the case was classified, who it was routed to, what was promised (amount, date, product), what was said, and the stage it ended in.
2. **Freeze the input.** One snapshot per case, read by both sides. Record which version of the procedure, the prompt and the tools the new side used, so a difference can be traced to a change.
3. **Record the difference, not the content.** Anthropic's team did not read customer requests. Each difference left a small record: the step, the piece, the first point where the two diverged, and the lengths. That record was enough to fingerprint a bug, because "one bug tends to leave the same fingerprint on every request it affects." For you: checkpoint, field, current value class, new value class ("routed to billing" vs "routed to support"). No names, no message text.
4. **Group by kind and alert only on a new kind.** One bug produced "hundreds of thousands of nearly identical diff records." A script grouped them every 10 to 30 minutes and alerted a coordinating agent "only when it saw a new kind of record," which then gave each new kind an owner. Do the same: one queue of difference kinds, each with an owner, not a flood of individual mismatches.
5. **A person rules on each kind.** This is the step that cannot be automated. In one case an agent made the outputs match with a workaround that would have been thrown away before launch, and an engineer turned it down. In Anthropic's words: "A verifier can tell an agent whether the outputs matched, but not whether the fix is good enough to ship."

## A redesigned operation should not match the old one

Here the operation case differs from a code migration. Anthropic wanted the Rust API to behave like the Python one. When you redesign an operation and then put agents inside it, some differences are the point: the new flow routes a warranty claim straight to the person who can approve it, or closes a case the old process left open for a week.

So before the shadow run starts, **write the list of expected differences**: each one named, with the checkpoint it shows up at and who approved it. Anthropic's engineers made the same call during the run, deciding "whether a difference between the Rust and Python APIs was the result of a bug or a deliberate change." Writing the list first keeps that decision with the people who designed the new operation.

Without that list, the shadow run quietly tunes the new operation back into the old one, because every intended improvement shows up as a mismatch to be fixed.

## Keep the old process moving during the run

Anthropic did the switch "without ever taking the service offline or freezing feature development." The Python version kept changing, so a check was added: a change to the Python code had to include a matching Rust change or an exemption.

Your current process will also change during a shadow run of a few weeks: a new price, a new policy, a new product. Give each change a mirror rule: whoever changes the current procedure also updates the new one, or records why not. Otherwise the shadow run measures a gap you created yourself.

## When to switch, and how

Decide the switch rules before the run, per case type, not for the whole process at once:

- **Unintended differences:** none open at the checkpoints where money, commitments or customer messages are decided.
- **Coverage:** enough live cases of that type have passed through both sides that the rare variants have had a chance to appear.
- **Ownership:** the owner of the case type signs off on the expected-differences list as it stands at the end.

Switch one case type at a time and keep the old path available for that type until the first weeks of live results are in. Anthropic reported that the new API uses about 70% less CPU per request and cut median time to first token by about 20%, measured after traffic moved, not predicted before it.

## When there is no old process to compare with

Sometimes there is nothing to shadow. In Rodo's case, WhatsApp, social and web enquiries were brought into a service operation with a measurable resolution path for the first time. The case record reports 82% of 604 live-created enquiries reached Resolved, with a median of about one hour, over 31 August–24 September 2026, and notes: "First measured window. No comparable earlier baseline." The figures describe pipeline records, not all conversations.

That window is now what the next change gets compared against. **A first measured window is the baseline that makes a future shadow run possible.** If your current process leaves no record of decisions at each checkpoint, start there.

## A first test

Pick one process an agent will take over. List its five checkpoints, write the expected-differences list with its owner, and run the new version in shadow on every live case for two weeks. Count the kinds of difference, not the mismatches. If a kind appears that nobody can rule on, that is the finding: the procedure has a gap that needs an owner before the agent does.

## Sources

- https://www.anthropic.com/research/migrating-api-to-rust
