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
The method, in short
- 1Run each request through the old and new code side by side and compare every step, such as validation and the built prompt.
- 2Record each difference as a small fingerprint of the step, the piece, and the first byte that differs, without reading user content.
- 3Have a script group new kinds of differences every 10 to 30 minutes and hand each kind to one Claude agent in a sandbox.
- 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.
