Articles

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

By Claus Villumsen
11 June, 2026
Share this article
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 AI Agents Actually Do When They Modernize Legacy Code
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.
The Part Where AI Doesn't Know Your Business Logic
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.
The Real Cost Nobody Talks About: Decision Fatigue
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 Human Engineers Still Win (And Will for a Long Time)
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.
The AI Modernization Hype Cycle: Where We Actually Are
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 You Should Actually Do Next
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?
Kodebaze combines AI-powered analysis with human-validated modernization roadmaps, so you get speed without the guesswork. See how it works →
Related articles

AI

AI

AI
AI + Human
AI + Human software Solution
© 2026 Kodebaze. All Rights Reserved.
© 2026 Kodebaze. All Rights Reserved.