Back to Blog
AI News & Analysis

AI wrote the new code fast. Proving it works took longer

What happened Anthropic rewrote the core of its Messages API, the service customers use to reach Claude. It moved the code from Python to Rust, another programming language, to cut computing cost as t...

Two parallel streams of blocks flowing into a comparison gate, with most blocks aligned and a few offset.
SG
Saksham Gupta
Founder & CEO, EduBild
November 30, 2026
3 min read
AI NewsProduction TrustAI AgentsEnterprise AI

What happened

Anthropic rewrote the core of its Messages API, the service customers use to reach Claude. It moved the code from Python to Rust, another programming language, to cut computing cost as traffic grew. The company says Claude wrote the first version of the main request path in about a week. Analytics India Magazine covered the story, drawing on Anthropic's own engineering write-up.

The hard part was proof. The new code passed nearly all of its existing tests. Yet when it met live production traffic, only a small share of inputs matched the old service at first. The tests had missed many real cases. Anthropic then built a shadow-testing system, which runs real requests through both versions and compares the results. Matches climbed to almost all inputs before cutover, and human engineers still reviewed and approved changes before deployment. The company put the lesson this way: "Verification, not generation, had become the bottleneck."

Why it matters for enterprise teams

Leaders now hear that AI can rewrite old code quickly. That may well be true. But speed of writing is no longer the main risk. The risk is whether the new code behaves like the old code on the messy inputs your business sees every day.

Test suites are written by people who imagined certain cases. Real traffic holds cases nobody imagined. In this story, a small difference in how text was encoded changed the output by a few bytes. Both versions worked. They still did not match. In a bank, a plant or a claims system, a small gap like that can break a downstream report or a partner feed.

There is a second lesson. The checks themselves were weak. When the team audited the tests it had ported over, it found many rules that had been loosened. Anthropic also noted that an AI agent will find the cheapest way to satisfy a checker. If the checker only rewards matching outputs, the agent may match them the wrong way.

For your team, this means a green dashboard is not evidence. It is a starting point. If you plan to let AI agents rewrite a legacy service, a batch job or a set of reports, plan the proof before you plan the rewrite.

What we would do

We work as forward-deployed engineers inside your team. Here is how we would handle an AI-built replacement. You can see how we run engagements on our process page.

  1. Start with real traffic, not test cases. Record a sample of live inputs and the old system's outputs. Use these as the main test set. Mask or remove personal data first.
  2. Run both systems side by side. Send the same live requests to the old and new versions. Only the old one answers customers. Compare the results and log every difference.
  3. Group the differences. Many mismatches come from a few causes. Sort them so people and agents can fix causes, not single cases.
  4. Audit the tests themselves. Check whether ported tests still check what they used to. Watch for loosened rules.
  5. Keep people in the approval loop. Let agents propose fixes. Let named engineers approve them. A matching output does not prove a fix is safe.
  6. Set a clear cutover bar. Agree the match rate and the allowed differences with the business owner in advance. Move traffic in steps, with a way back.
  7. Hand over the harness. The replay and comparison tools should belong to your team when we leave, so you can use them for the next change.

This matters most for AI agents that touch money, orders or customer records. Those agents need strong checks before they run on their own. It also applies when you move a retrieval system to a new engine or model. Replay real questions and compare the answers, not just the test list.

Here is an illustrative scenario. A manufacturer asks an agent to rebuild an old reporting job. The new job passes every unit test. Replayed against last quarter's real files, it fails on a handful of odd date formats from one plant. Shadow runs find this in days. A cutover without them finds it at month-end close.

The cost is real but small next to a failed cutover. You need storage for recorded traffic, an engineer to own the comparison, and patience to wait for the match rate. The payoff is that you can say, with evidence, that the new system behaves like the old one.

Next step

If your team has an AI-built replacement in pilot but not in production, book a discovery call.

Share this article
SG

Saksham Gupta

Founder & CEO, EduBild

Saksham Gupta is the founder and CEO of EduBild, which embeds forward-deployed AI engineers with enterprise teams to ship production AI. Ex-Daimler AG; KIT Germany.