HOW-TO GUIDE

How to migrate a live API with Claude agents and shadowed production traffic

Based on a guide by Lance Martin, Jake Eaton, Arvin Aminpour, Emma Webb, Bharat Mediratta, and Ravi Trivedi on the Anthropic blog · Nov 25, 2026

You'll end with: A rewritten service that matches the old one on real production traffic, with agents fixing each difference they find.

Why it's worth having: Anthropic moved its Messages API from Python to Rust this way with no downtime, and it now uses about 70% less CPU per request.

At a glance

WHO IT'S FOR
Software leads, platform engineers, and IT teams who own a production service they want to rewrite.
LEVEL
Advanced
COST
Free to read. The method needs Claude agents, cloud sandboxes, and a way to shadow production traffic.
YOU NEED
The existing production service · Claude agents · Cloud sandboxes with both codebases · A shadow traffic setup

The method, in short

  1. 1Run each request through the old and new code side by side and compare every step, such as validation and the built prompt.
  2. 2Record each difference as a small fingerprint of the step, the piece, and the first byte that differs, without reading user content.
  3. 3Have a script group new kinds of differences every 10 to 30 minutes and hand each kind to one Claude agent in a sandbox.
  4. 4Save every engineer correction as a rule all agents read, then check each merged fix against shadowed traffic.

The post walks through the inner, outer, and memory loops, with charts of the CPU and latency results.