DAN Analysis 8 min read

From Airbnb's Test Migration to Mainframe COBOL Refactors: AI Code Migration in 2026

AI agents orchestrating legacy code migration from COBOL mainframes and Java upgrades to modern frameworks in 2026
Before you dive in

This article is a specific deep-dive within our broader topic of AI Code Migration.

This article assumes familiarity with:

TL;DR

  • The shift: AI code migration moved from writing conversions one file at a time to orchestrating deterministic refactoring engines at enterprise scale.
  • Why it matters: The bottleneck stopped being model quality and became which proven tools the agent can drive, and legacy mainframes are the new battleground.
  • What’s next: Hyperscalers, recipe-engine vendors, and model labs are converging on the same agentic pattern, with COBOL modernization where the money moves in 2026.

Two years ago, Airbnb fed thousands of test files to a language model and watched three-quarters of them convert in an afternoon. The headline was speed. The real lesson was buried in the method, and that method just rewrote an entire enterprise category.

AI Stopped Writing Migrations. It Started Driving Them.

Thesis (one sentence, required): The story of AI Code Migration in 2026 is not that models got better at writing code, it is that they stopped writing migrations from scratch and started orchestrating deterministic tools that already worked.

The old playbook had two camps. Hand-written Codemod scripts and OpenRewrite recipes gave you precision but demanded an expert for every edge case. Single-shot LLM conversion gave you speed but hallucinated under pressure.

The 2026 pattern fuses them. An agent plans the migration, selects a trusted recipe, runs the transformation, then validates the output, looping until the tests pass.

The deterministic engine does the surgery. Recipes built on a lossless representation of the Abstract Syntax Tree rewrite code without guessing. The model handles the fuzzy parts: which recipe, in what order, and how to fix what breaks.

Moderne now exposes more than 3,500 OpenRewrite recipes as callable agent tools, invoked through function calling and the Model Context Protocol rather than pasted into a prompt (Moderne). The agent is not the author anymore. It is the foreman.

That distinction is the whole story.

Four Players, One Playbook

Here is the tell that this is a trend and not a demo: four independent teams placed the same bet inside eighteen months.

Airbnb migrated roughly 3,500 React component tests from Enzyme to React Testing Library, and the winning tactic was not clever prompting. Brute-force retries with per-file parallel steps beat prompt engineering outright (Airbnb Engineering). Seventy-five percent of files converted in the first four hours; 97% landed automatically, with the last 3% finished by hand. The six-week project replaced an estimated year and a half of manual engineering.

AWS industrialized the same idea through Amazon Q Code Transformation, now absorbed into the broader AWS Transform product. It upgraded customers like Novacomp from Java 8 to 17 across more than 10,000 lines in minutes instead of roughly two expert-weeks (AWS). A year in, AWS reported the platform had processed 4.5 billion lines of code and saved 1.6 million engineering hours, with a 250,000-line mainframe application transformed and tested in about six weeks (AWS).

Then the frontier moved to the hardest target. IBM’s watsonx Code Assistant for Z converts COBOL to Java using a model tuned on COBOL-Java pairs, and its current release adds an agentic workflow (IBM). In February 2026, Anthropic published a code modernization playbook in which Claude Code reads COBOL, maps dependencies, and scaffolds a strangler-fig migration (Anthropic).

Four teams. One architecture: agents driving validated transforms, not generating code blind.

That is convergence. Convergence is how you tell a structural shift from a press cycle.

Who Cashes In

The hyperscalers move first. AWS turned migration into a metered service, and the volume numbers say enterprises are buying.

Recipe-engine owners win the layer underneath. An agent is only as trustworthy as the tools it can call, and Moderne’s OpenRewrite catalog is the deepest deterministic toolbox on the market as of mid-2026.

Model labs entering modernization win the narrative. Anthropic’s COBOL playbook planted a flag on the most lucrative legacy estate in the world.

And the enterprises sitting on decades of mainframe code finally get a credible exit. You are either piloting agentic migration on a real workload now or you are paying expert-week rates while a competitor pays by the validated commit.

Who Gets Refactored Out

Migration consultancies that price by the expert-week are selling the exact unit the agent compresses to minutes. That model does not survive a 250,000-line transform measured in weeks.

Vendors betting on single-shot code generation without a deterministic validation gate are next. Speed without verification is a liability on a payroll system, and the market has figured that out.

The repricing was public. When Anthropic released its modernization playbook on February 23, 2026, IBM shares fell roughly 13%, shedding around $31 billion in market value in what tech press called its largest single-day drop since 2000 (Techzine). IBM ships its own COBOL agent, so this was not a verdict on its tooling. The market repriced the legacy-services moat, not the technology.

The lesson cuts the same way for everyone: the moat is the validated tool catalog and the agent that drives it, not the billable hours around it.

What Happens Next

Base case (most likely): Agentic migration over deterministic recipes becomes the default for enterprise modernization, with COBOL-to-Java as the flagship use case. Signal to watch: A second hyperscaler or model lab ships a dedicated mainframe modernization agent. Timeline: Through the end of 2026.

Bull case: Validated migration agents expand from language upgrades into framework and cloud re-platforming, and audited transforms become a procurement checkbox. Signal: Enterprises publishing migration volume metrics the way AWS now does. Timeline: 2027.

Bear case: A high-profile agentic migration corrupts a production system, validation gaps make headlines, and regulated industries freeze rollouts pending audit standards. Signal: A public post-mortem on an AI-driven migration failure in finance or government. Timeline: Any time; the risk is live now.

Frequently Asked Questions

Q: Which companies have used AI to migrate large codebases? A: Airbnb migrated roughly 3,500 React test files. AWS reports customers like Novacomp upgrading Java 8 to 17 across 10,000-plus lines in minutes, and IBM and Anthropic now target COBOL mainframes. The pattern spans startups to Fortune 500 legacy estates.

Q: How did Airbnb use LLMs to migrate thousands of test files? A: Airbnb split each file into parallel migration steps, then relied on brute-force retries instead of prompt engineering. Seventy-five percent of files converted in the first four hours, 97% automated overall, finishing a six-week project that replaced about 1.5 years of manual work.

Q: Where is AI code migration heading in 2026? A: Toward agentic orchestration over deterministic recipe engines, with enterprise mainframes the next frontier. Agents will not write conversions from scratch. They drive validated tools like OpenRewrite through standardized protocols, then test the output automatically until it passes.

The Bottom Line

The winning architecture is settled: agents that orchestrate deterministic refactoring beat both hand-written scripts and blind code generation. Watch for a second hyperscaler to ship a mainframe agent, because that is the move that confirms COBOL modernization as the category’s center of gravity.

Disclaimer

This article discusses financial topics for educational purposes only. It does not constitute financial advice. Consult a qualified financial advisor before making investment decisions.

AI-assisted content, human-reviewed. Images AI-generated. Editorial Standards · Our Editors

Share: