Legacy System Modernization in the AI Era: Why Rewrites Still Fail and What Works Instead
← All insights
ModernizationNovember 2026· 17 min read

Legacy System Modernization in the AI Era: Why Rewrites Still Fail and What Works Instead

VVerensoft TeamEngineering & Strategy

Every legacy system modernization project we have been asked to rescue began with the same sentence. Somebody senior stood in front of a whiteboard and said that this time the company would do it properly, from a clean sheet. The old system was a mess. It ran on a platform nobody wanted to hire for, its original authors had left years ago, and every change took three times longer than it should. A fresh build on a modern stack would take twelve months, perhaps fourteen. Everybody in the room nodded, because everybody in the room was tired of the old system.

Two years later the new system was sixty percent complete and the old one was still running the business. The team was maintaining both. The budget had doubled. The features the new system lacked turned out to be the ones nobody had written down, because nobody knew the old system did them. A report that finance depended on every quarter end. A rounding rule that one large customer had negotiated in 2014. A nightly job that quietly corrected a data problem introduced by a different nightly job. The old system was a mess, and the mess was the specification.

This article is about doing it differently. We approach legacy system modernization as an incremental replacement rather than a rewrite, and over the last two years AI has changed the economics of that approach quite substantially. It has made the expensive early work of understanding an old system far cheaper. It has not made the hard decisions any easier. Knowing which is which is most of what separates a modernization that finishes from one that becomes the next legacy problem.

What legacy actually means

Legacy is not a polite word for old. Plenty of old software is perfectly healthy. A system becomes legacy when the cost and risk of changing it have grown out of proportion to the value of the change. The usual symptoms are familiar. Simple requests take weeks. Each release breaks something unrelated. Only one or two people understand the critical parts, and the business becomes nervous when they book a holiday. New hires take months to become useful. Integrating with anything modern requires a workaround built on a workaround.

Underneath those symptoms are usually three causes. The knowledge of how the system works has left the building and lives only in the code. There are no automated tests, so nobody can change anything with confidence. And the technology underneath has aged to the point where security patches, hosting, and hiring are all becoming harder each year. Notice that only the third of those is about technology. The first two are about knowledge and safety, and they are the ones that sink projects.

It is also worth saying plainly what a legacy system has going for it. It works. It encodes years of decisions about how the business really operates, including hundreds of edge cases that were each added because something went wrong once. That accumulated behaviour is an asset, and the central risk in any modernization is throwing it away without realising it was there.

Why the big rewrite still fails

The clean sheet rewrite is attractive for understandable reasons. Engineers would rather build than excavate. Leaders would rather announce a new platform than fund a renovation. And the plan fits on one slide. It fails, with remarkable consistency, for reasons that have nothing to do with the skill of the team.

  1. 01The specification is hidden. The true requirements are whatever the old system currently does, and no document describes that. The team discovers the requirements one production incident at a time.
  2. 02The target keeps moving. The business does not stop for two years. Every change made to the old system during the rewrite is another thing the new system has to catch up with.
  3. 03Value arrives only at the end. Nothing is delivered until everything is delivered, so for most of the project the business is paying for two systems and benefiting from one.
  4. 04The cutover is a single enormous bet. Switching everything in one weekend concentrates every risk into the moment when there is least room to recover.
  5. 05Patience runs out first. Budgets are reviewed annually. A project that has shown nothing usable by the second review is the first thing cut, usually when it is most of the way there.

AI has made one of those five better. A team with good coding agents can produce the new code faster, which shortens the window in which the target moves. It has done nothing for the other four. The hidden specification is still hidden. The value still arrives at the end. The cutover is still one large bet. A rewrite that would have failed in thirty months can now fail in eighteen, which is an improvement of a sort, but not the one anybody was hoping for.

“The old system is not just code. It is the only complete record of how your business actually works. Read it before you replace it.”

The strangler approach, in plain terms

The alternative has an unfortunate name and a very good track record. The strangler approach takes its name from a fig that grows around a host tree, gradually taking over until the original is no longer needed. Applied to software, it means building the new system around the edges of the old one and moving responsibility across one piece at a time, while the old system keeps running throughout.

In practice you place a thin routing layer in front of the legacy system. At first it passes every request straight through and changes nothing. Then you pick one well bounded capability, perhaps customer notifications or quote generation, build it properly in the new stack, and tell the routing layer to send those requests to the new code. Everything else continues to go to the old system. Users may not notice anything except that one part became faster or gained a feature they had been asking for.

Then you do it again with the next capability. Each step is small enough to test thoroughly and to reverse within minutes if something is wrong. Each step delivers something the business can use. And at every point along the way you have one working system, part old and part new, rather than one working system and one unfinished promise. If funding is paused at the halfway mark, you keep everything delivered so far. Compare that with a rewrite paused at the halfway mark, which leaves you with nothing at all.

What AI changes in legacy system modernization

The most expensive phase of modernization used to be archaeology. Before anyone could safely change or replace a module, a senior engineer had to read it, trace what called it, work out what the cryptic variable names meant, and reconstruct the business rule buried inside. On a large system this consumed months of the most expensive people on the project, and the understanding they gained lived mostly in their heads.

This is the part AI has transformed. Modern models read old code extremely well, including languages and frameworks that few working engineers have touched in a decade. Given a codebase, they can produce a map of what depends on what, plain language descriptions of what each module does, a list of the business rules embedded in the logic, and a catalogue of every place the system reads or writes a particular piece of data. Work that took a quarter can now take a few weeks, and the output is a written document rather than one person's memory.

Documentation that finally exists

For many organisations the first tangible result of a modernization engagement is that the legacy system is documented for the first time in its life. That alone reduces risk, even if nothing else changes. The dependency on the two people who understand the billing module becomes less acute the moment its rules are written down in language the finance team can read and correct.

Translation, with supervision

Models can also translate code from an old language to a modern one, and this is where expectations need managing. A mechanical translation preserves the old structure, including all its awkwardness, in a new syntax. You end up with modern looking code that is just as hard to maintain. Translation is useful for well isolated calculations and data transformations, where preserving exact behaviour is the goal. For anything structural, it is better to have the model explain what the old code does, have a person decide how it should be built now, and then generate the new version against that decision.

Where it still gets things wrong

A model reading code will describe what the code appears to do. It cannot know that a particular branch has been dead since a 2017 configuration change, or that a strange condition exists because of one customer's contract. It will occasionally summarise a subtle rule as a simpler one. Every AI produced description of important behaviour needs to be checked against the running system and against the people who use it. The model gives you a strong first draft of the truth in days. It does not give you the truth.

Weeks
To map and document a system that once took a quarter
1
Working system at every stage of an incremental migration
Minutes
Time to roll back a single migrated capability

Characterisation tests: the safety net you build first

Before replacing any part of a legacy system, you need a way to prove the replacement behaves the same. Since there is no specification, the old system itself is the reference. A characterisation test captures what the system currently does for a given input, without any opinion about whether that behaviour is right. Feed in this order, record the invoice that comes out. Feed in ten thousand historical orders, record ten thousand invoices. That recording becomes the standard the new code must match.

This technique has existed for decades and was always sound. It was also tedious enough that teams routinely skipped it. Agents have removed most of the tedium. They are well suited to generating large numbers of test cases, replaying real historical inputs through both systems, and reporting every difference. What used to be weeks of dull manual work is now largely automated, which means there is no longer a good excuse to migrate anything without it.

The differences these tests expose fall into three groups, and sorting them is human work. Some are bugs in the new code, which get fixed. Some are bugs in the old system that the business has unknowingly depended on, which need a deliberate decision. And some are behaviours nobody knew existed, which are exactly the hidden requirements that destroy rewrites. Finding them in a test report in week six is very different from finding them in production in month twenty.

Data is where modernization projects are won or lost

Code gets the attention. Data causes the failures. Twenty years of records carry twenty years of history. Fields that changed meaning halfway through. Dates stored as text in four formats. Customers entered three times with slightly different spellings. Values that are technically invalid but that some report quietly relies upon. A new system with a clean, strict data model will reject a surprising share of the old data on first contact.

  • Profile the data before designing anything. Know how many records violate the rules you intend to enforce, and decide what happens to them.
  • Treat migration as a product, not a script. It will be run many times, so it needs tests, logging, and the ability to resume after a failure.
  • Rehearse with full production volumes. A migration that works on a sample often fails on timing, memory, or one malformed record in the four millionth row.
  • Reconcile by totals, not by inspection. Record counts, balances, and key sums should match between old and new, and any difference should be explained before going live.
  • Keep the old data readable. Somebody will need to look up how something appeared in the original system, usually an auditor, usually at short notice.

The incremental approach helps here as well. When capabilities move across one at a time, their data moves with them in manageable portions, and for a period both systems may need to see the same records. Keeping two systems in agreement during that period is real engineering work and should be budgeted honestly. It is still considerably safer than moving everything in a single weekend. The same lessons apply when the system being replaced is an ageing ERP, which is why so much of our ERP software development effort goes into migration rehearsal rather than screens.

Sequencing by business risk, not technical neatness

Engineers left to choose the order will often start with whatever is technically cleanest or most interesting. A better order is set by the business. For each candidate capability, ask how much pain it causes today, how much value a modern version would release, and how bad it would be if the migration went wrong. Then start with something that scores high on value and low on danger.

The first slice matters more than any other because it proves the method. It should be visible enough that people notice the improvement and contained enough that a problem would be an inconvenience rather than a crisis. Reporting, notifications, document generation, and customer facing lookups are frequent good candidates. The core transaction engine, the thing that would stop the business if it failed, comes later, once the team has migrated several pieces, the routing layer is trusted, and the rollback procedure has been used for real.

Some parts of the old system should never be migrated at all. Every legacy system contains features that nobody has used in years. Usage data and a frank conversation with the people who do the work will usually identify a meaningful share of the system that can simply be retired. Code you delete costs nothing to modernize.

Infrastructure usually has to move too

Old software tends to live on old infrastructure, and the two are more entangled than they first appear. A system that assumes it runs on one particular server, writes files to a local disk, and is deployed by hand on a quiet Sunday will not sit comfortably beside new services that are deployed several times a day. Part of any modernization is deciding where everything will run and how it will be released.

Our usual advice is to resist moving the legacy system and rebuilding it at the same time. Either move it largely as it is onto modern hosting first, so that old and new can sit side by side and talk to each other easily, or leave it where it is and connect the new services to it carefully. Changing the code and the platform in a single step doubles the number of things that can go wrong and makes it much harder to tell which change caused a problem. A sound cloud migration strategy is chosen per workload, and the legacy core often deserves the most conservative option available.

Legacy system modernization cost and timeline, honestly

The question every buyer asks first is what this will cost and how long it will take. The honest answer depends on the size of the system, the state of its data, and how much of it genuinely needs to survive, but some shapes are reliable. A discovery phase that maps the system, documents its rules, and produces a sequenced plan typically takes four to eight weeks and is a modest, fixed commitment. It is the best money spent on the whole programme, because it turns an unknown into a plan with numbers attached.

After that, the first migrated capability usually reaches production within two to three months, and further slices follow at a steady rhythm. A mid sized business system is commonly modernized over twelve to twenty four months in total. That is not obviously shorter than a rewrite promises. The difference is that value arrives from the third month rather than the twenty fourth, the spend can be paused or redirected at any slice, and the estimate becomes more accurate as you go rather than less.

On cost, AI has removed a real share of the effort in analysis, test generation, and routine code, and legacy software modernization services are meaningfully cheaper than they were a few years ago as a result. What has not become cheaper is data migration, parallel running, user retraining, and the time of your own people, who are needed to confirm what the old system is supposed to do. When comparing proposals, be wary of any quote that prices the code and is vague about those four. That is where budgets go, and a vendor who has done this before will itemise them without being asked.

Rewrite, replace, or modernize: how to choose

Incremental modernization is not always the answer. If the process the legacy system supports is entirely standard, an off the shelf product may serve you better than anything custom, and the project becomes a data migration. If the system is small, perhaps a few months of work to rebuild, and its behaviour is well understood, a straightforward rewrite carries little risk and is the simplest path. And if the system works, is cheap to run, and rarely needs to change, the right decision may be to leave it alone and spend the money elsewhere.

Incremental modernization earns its place when the system is large, central to how the business operates, poorly documented, and too important to switch off for an experiment. That describes a great many of the systems we are asked about. When choosing a partner for that kind of work, ask how they will establish what the current system does, how they will prove the new parts behave the same, what the first deliverable is and when you will be able to use it, and what happens if you stop halfway. Clear answers to those four questions tell you more than any technology list.

Living with a system nobody wants to touch?

Show us what you are running and we will give you an honest view: what should be modernized, what should be replaced with a product, what can be retired, and what should be left alone. You will leave the conversation with a sense of sequence, cost, and risk, whether or not we are the ones who do the work.

Talk to our engineers

The old system as an opportunity

There is one more reason to modernize in pieces, and it has become more important in the last two years. The businesses getting real value from AI are the ones whose core systems can be reached. A model cannot help with order processing if orders live in a database that only one old application is allowed to touch. Every capability moved to a modern service with a clean interface is a capability that can later be automated, analysed, or assisted.

So modernization is not only a way to reduce risk and maintenance cost, although it does both. It is the groundwork for everything a business wants to do next. Seen that way, the old system stops being an embarrassment to be replaced as fast as possible and becomes what it always was, which is a detailed record of how the business works, waiting to be read properly and carried forward.

Read it before you replace it. Move one piece at a time. Prove each piece against the original. Keep one working system at every step. Those four habits are most of the method. Once the core is reachable, the same foundations support AI integration and automation on top of the processes the old system has been guarding all along.

V
Verensoft TeamEngineering & Strategy

We build AI systems and custom software for businesses that want results, not decks. Questions about this article? Get in touch.

AI Inference Infrastructure: GPUs, Kubernetes, and What It Really Costs to Run Models in Production
Read next

AI Inference Infrastructure: GPUs, Kubernetes, and What It Really Costs to Run Models in Production