Articles

Blog section illustration

When AI Agents Start Rewriting Your Mainframe: What CTOs Actually Need to Know

Author img

By Claus Villumsen

11 June, 2026

Share this article

AI Engineering Legacy Modernization ⏱ 12 min read 📅 May 2025

AWS just announced something that should make every CTO with a mainframe either very excited or very nervous. Their Transform Agents can now modernize legacy code "without human engineers." OpenLegacy integrated their platform into it. DesignVerse is positioning their sovereign AI specifically for European legacy systems. The promise is everywhere: AI will finally fix the code nobody wants to touch.

But here's what nobody is saying in the press releases. These tools are not magic. They are powerful, yes. They can do things that would have taken consulting teams months. But they can also fail spectacularly if you don't understand what they're actually doing under the hood.

I've watched three companies this year alone start AI-driven modernization projects with massive confidence and then quietly pause them six months later. Not because the AI was bad. Because they expected it to be something it wasn't. They thought they were buying a solution. What they actually bought was a very sophisticated tool that still required them to make dozens of judgment calls they weren't prepared for.

When was the last time you actually mapped out which parts of your legacy system are documented, which parts have institutional knowledge attached to them, and which parts nobody really understands anymore?

What do AI agents actually do when modernizing legacy code?

AI agents analyze legacy code syntax, identify patterns, and automatically translate it into modern languages and frameworks. They refactor basic structures and dependencies but require human validation for business logic, integration points, and architectural decisions that cannot be inferred from code alone.

Let's start with what these tools are genuinely good at. AWS Transform Agents, for example, can scan millions of lines of COBOL or Java, identify architectural patterns, and generate cloud-ready versions of workloads. They can detect dependencies. They can flag risky sections. They can even suggest refactoring strategies based on what they've learned from thousands of other modernization projects.

The core capability is pattern recognition at scale. These AI agents have been trained on enormous datasets of legacy code migrations. They know what a typical mainframe-to-cloud transformation looks like. They know common anti-patterns. They know which architectural decisions tend to cause problems downstream.

OpenLegacy's integration into AWS Transform takes this a step further by keeping mainframe workloads connected during the migration. That matters because one of the biggest risks in modernization is breaking integrations. You move one workload to the cloud, and suddenly three other systems that depended on it stop working. OpenLegacy's approach tries to maintain those connections as you modernize incrementally, one workload at a time.

This is not a small thing. Incremental migration with live connectivity is vastly safer than big-bang rewrites. But it also means the AI has to understand not just the code, but the runtime behavior of your entire system ecosystem. And that's where things get complicated.

Can AI understand your business logic in legacy systems?

AI cannot reliably understand undocumented business logic embedded in legacy systems. It recognizes code patterns but misses organizational context, regulatory requirements, historical decisions, and unwritten rules that employees know. Domain experts must work alongside AI to validate that critical business rules survive modernization.

Here's the problem that shows up about three months into every AI-driven modernization project I've seen. The AI can refactor the code. It can move it to the cloud. It can even make it run faster. But it has no idea why that code exists in the first place.

You have a batch job that runs every night at 2 AM and does something incredibly specific with customer data. The AI sees inefficient code. It sees an opportunity to optimize. It suggests a microservice architecture. It generates the new code. Everything compiles. Everything deploys. And then, six weeks later, your finance team realizes that a compliance report they've been running for eight years is now missing a column that nobody knew was critical.

AI agents don't know what your business needs, they only know what the code does. And those are not the same thing. The code might be doing something for a reason that was never documented. It might be compensating for a quirk in another system. It might be implementing a regulatory requirement that only your most senior developers remember.

This is why DesignVerse is positioning their platform specifically for European legacy systems with an emphasis on sovereignty and compliance. They're acknowledging that modernization isn't just a technical problem. It's a regulatory one, a business-logic one, and often a political one inside large organizations. Their bet is that a platform tuned for European regulatory environments will make fewer dangerous assumptions.

Maybe they're right. But even the smartest AI agent still needs humans to tell it what matters and what doesn't. And most organizations don't actually know anymore.

What is decision fatigue in AI modernization projects?

Decision fatigue happens when AI generates thousands of code change suggestions requiring human review. CTOs and engineers become overwhelmed choosing between AI-proposed options, creating approval bottlenecks that negate time savings. This hidden cost drains leadership attention and slows projects despite faster initial code generation.

Traditional consulting-led modernization has a clear model. You hire a team. They spend months analyzing your code. They come back with a plan. You argue about the plan. You revise the plan. Eventually, you execute the plan. It's slow. It's expensive. But the decision-making is structured.

AI-driven modernization flips this. The AI generates options fast. Really fast. It can show you twelve different ways to refactor a single module. It can propose three different cloud architectures. It can flag 200 code smells and suggest fixes for all of them. And it can do this in a week.

The bottleneck shifts from analysis to decision-making, and most leadership teams are not ready for that shift. You suddenly have to decide which AI recommendations to follow, which to ignore, and which to modify. You have to prioritize. You have to assess risk. You have to make judgment calls on dozens of technical nuances that your team barely understands.

I watched one CTO describe this as "drowning in options." The AI gave them more paths forward than they had capacity to evaluate. They ended up reverting to a traditional consulting engagement just to have someone else make the calls. They didn't lack AI capability. They lacked decision-making bandwidth.

This is not a failure of the AI. This is a failure to understand what kind of problem you're actually solving. Modernization is not a technical problem that AI can solve autonomously. It's a decision-intensive process that AI can accelerate, but only if you have the organizational capacity to absorb the velocity.

If an AI agent proposed 50 architectural changes to your most critical legacy system tomorrow, do you actually have a process in place to evaluate them, or would your team just be paralyzed?

Where do human engineers still outperform AI in code modernization?

Human engineers outperform AI in understanding business context, making strategic architectural decisions, ensuring security compliance, managing stakeholder expectations, and validating that modernized systems preserve essential business rules. They bring organizational knowledge and judgment that AI models cannot derive from examining code structure alone.

Let's be clear about what AI agents cannot do, at least not yet. They cannot navigate organizational politics. They cannot convince your finance team that the upfront cloud costs will pay off in two years. They cannot mediate the fight between your infrastructure team and your application team about who owns the new microservices. They cannot sit in the room when your CEO asks why this is taking so long and make the case for why you should keep going.

AI agents also struggle with truly novel architectural problems. If your legacy system is built on a homegrown framework that nobody outside your company has ever used, the AI has no training data to draw from. It can't pattern-match against other projects because there are no other projects. It can make guesses. It can try things. But it's not operating with the same confidence it has when refactoring a standard Java monolith.

Human engineers understand context in ways that AI agents do not. They know that the reason nobody has modernized that one module yet is because the last person who tried got fired. They know that the CIO has a pet project that has to ship before you can touch the mainframe. They know which technical debt is actually causing pain and which is just ugly but functional.

The companies that are succeeding with AI-driven modernization are not the ones replacing engineers with agents. They're the ones using agents to amplify their best engineers. The AI does the scanning, the pattern recognition, the grunt work of refactoring. The humans do the judgment calls, the risk assessment, the business-logic validation, and the organizational navigation.

That partnership is where the real value is. And it requires both sides to be good at what they do.

Where are we in the AI modernization hype cycle?

AI modernization is past peak hype but not yet mature. Tools can accelerate code translation but cannot autonomously handle enterprise complexity. We are in the practical experimentation phase where early adopters discover real capabilities and limitations, setting realistic expectations for hybrid human-AI approaches rather than full automation.

We are in the peak hype phase of AI-driven legacy modernization right now. Every major cloud vendor has an AI agent story. Every modernization consultancy has pivoted to talk about AI-assisted transformation. Every press release promises faster, cheaper, better outcomes with less human intervention.

Some of it is real. AWS Transform Agents are genuinely capable. OpenLegacy's integration work is solving real problems. DesignVerse's focus on European compliance is addressing a legitimate gap. These are not vaporware products. They work. They deliver value. But they are not autonomous miracle workers.

The honest truth is that AI agents are very good at accelerating work that humans already know how to do, but they are not yet capable of replacing the strategic thinking that separates a successful modernization from a failed one. They can refactor code faster than any consulting team. They can identify patterns you would have missed. They can generate options you wouldn't have considered. But they can't tell you which option is right for your business.

The next phase of this market will be disillusionment. Some high-profile AI-driven modernization projects will fail. Some will go over budget. Some will deliver technically sound code that doesn't actually solve the business problem. And the narrative will shift from "AI will modernize everything" to "AI modernization doesn't work."

Both narratives will be wrong. The real story is more boring. AI agents are a tool. A powerful one. A transformative one, even. But still a tool. They require skill to use well. They require judgment to deploy correctly. And they require organizational maturity to integrate into your existing processes.

If you approach them with that mindset, they will absolutely accelerate your modernization. If you approach them expecting magic, you will be disappointed.

What should CTOs actually do about AI mainframe modernization?

CTOs should pilot AI modernization tools on low-risk systems first, maintain strong human oversight, and build hybrid teams combining AI acceleration with experienced engineers. Set realistic expectations for 20-35% cost savings, not full automation. Invest in governance frameworks to manage AI-generated decisions and validate business logic preservation.

If you're responsible for a legacy modernization project, here's what matters right now. First, stop thinking about AI agents as a replacement for your modernization strategy. Think about them as an accelerant. They will make the things you're already doing faster, but they won't decide what you should be doing.

Second, invest in decision-making infrastructure before you invest in AI tooling. Build a clear prioritization framework. Define what success looks like. Identify who has authority to make which calls. Map out your riskiest dependencies. Document your business-critical logic, even if it's painful and time-consuming. The AI will generate options faster than you can evaluate them. If you don't have a way to evaluate them, you're just trading one bottleneck for another.

Third, run a small pilot before you commit to a full transformation. Take one workload. One that's important but not mission-critical. Let the AI agent modernize it. See what breaks. See what decisions you have to make. See where the AI is confident and where it's guessing. Learn what your team is good at and where they struggle. Then scale from there.

And fourth, be honest about what you don't know. If you're a CTO who hasn't personally looked at your mainframe code in a decade, you are not in a position to evaluate AI-generated modernization plans on your own. You need people who understand that code. You need people who understand your business logic. You need people who can spot the difference between a good refactoring and a dangerous one.

AI agents are not going to eliminate the need for expertise. They're going to change what expertise looks like. The question is whether you're building that expertise now or waiting until you're halfway through a failed migration.

If you started an AI-driven modernization project tomorrow, who on your team would actually be equipped to validate the AI's recommendations, and is that enough people to sustain a multi-year transformation?

Frequently Asked Questions

Can AI agents actually modernize legacy mainframe code?

AI agents can convert syntax and refactor basic code structures in legacy systems, but they struggle with undocumented business logic, custom integrations, and institutional knowledge embedded in decades-old mainframe applications. They work best as acceleration tools for human engineers rather than complete replacements.

What is the difference between AI code modernization and traditional replatforming?

Traditional replatforming involves human engineers manually analyzing, rewriting, and testing legacy code over months or years. AI code modernization uses machine learning models to automatically translate code between languages and architectures, reducing timeline but still requiring human oversight for business logic validation and integration testing.

How do AI agents handle undocumented business logic in mainframe systems?

AI agents cannot reliably interpret undocumented business logic without human guidance. They identify code patterns but miss context like regulatory requirements, edge cases, and unwritten rules that long-time employees understand. CTOs must pair AI tools with domain experts who can validate business logic during modernization.

What does AI-assisted mainframe modernization actually cost?

AI modernization reduces direct engineering hours by 40-60% but introduces new costs including AI tooling licenses, decision review overhead, increased testing cycles, and expert validation time. Total cost savings typically range from 20-35% compared to traditional approaches, not the 70-80% often marketed.

How long does AI-powered legacy code modernization take?

AI agents can generate initial code conversions in weeks rather than months, but complete modernization including testing, validation, and integration still takes 6-18 months for enterprise mainframe systems. The AI accelerates translation but not the critical business logic verification and stakeholder approval processes.

Where do human engineers outperform AI in mainframe modernization?

Human engineers excel at understanding business context, making architectural decisions, handling security implications, managing stakeholder communications, and validating that modernized code preserves critical business rules. They interpret organizational knowledge and regulatory requirements that AI models cannot extract from code alone.

What is decision fatigue in AI code modernization projects?

Decision fatigue occurs when AI agents generate thousands of code suggestions that require human review and approval. CTOs and lead engineers become overwhelmed evaluating AI-generated options, creating bottlenecks that offset the speed gains from automated code generation. Proper governance frameworks mitigate this issue.

Should CTOs invest in AI agents for mainframe modernization in 2026?

CTOs should pilot AI modernization tools on non-critical systems first while maintaining human oversight. The technology accelerates conversion but is not autonomous. Invest in hybrid approaches combining AI code generation with experienced engineers who understand your business logic, rather than expecting full automation.

Kodebaze combines AI-powered analysis with human-validated modernization roadmaps, so you get speed without the guesswork. See how it works →

Related articles

Blog section illustration

AI

The Continuous Modernization Pipeline: How to Keep Modernizing Without Stopping to Ship
Most modernization programs stall because they are designed as projects with a start and end date. The organizations winning in 2026 treat modernization as a permanent pipeline — embedded in every sprint, measured like delivery, and impossible to pause without also pausing shipping.
Author img
By  Claus Villumsen
14 April, 2026
Blog section illustration

AI

AI vs. Consulting for Legacy Modernization: An Honest CTO's Guide
You have a legacy system holding your business hostage. A consulting firm costs a fortune. AI tooling sounds risky. An honest CTO’s guide to what each approach actually delivers — and how to combine them without getting burned.
Author img
By  Claus Villumsen
17 April, 2026
Blog section illustration

AI

How to Assess and Roadmap a Large Legacy Estate: A CTO's Field Guide
Someone handed you a list of 23 legacy systems and said “make a plan.” No documentation, no ownership map, no clear budget. This is the practical field guide for how CTOs actually assess a large legacy estate and build a modernization roadmap that gets funded and executed.
Author img
By  Claus Villumsen
16 April, 2026

AI + Human software Solution

Follow us

© 2026 Kodebaze. All Rights Reserved.