Insights

What is a legacy system: risk signs and when to modernize

Published · updated

By Ithaca

A legacy system is software that still supports an important part of the operation, but that the team can no longer change safely and at a reasonable cost, for lack of tests, up-to-date documentation, people who know the code or support for the technology. The system’s age matters less than the cost of changing it.

On 1 August 2012, the American brokerage Knight Capital started the day with a new version of its order-routing system, installed server by server over the previous days. One of the eight servers, however, was left without the new code. On it ran Power Peg, a function unused since 2003 that could still be triggered. A flag repurposed by the new version activated that old code, and in about 45 minutes the system sent millions of orders to the market. The loss exceeded $460 million, according to the SEC order that investigated the case.

Knight’s system had just been updated. The problem lay in an old stretch of code that nobody tested again after a change made in 2005, and in an installation with no second technician checking it. When the code keeps running in production but the team no longer knows what it does, the system has become legacy, and that happens long before the technology is discontinued.

What a legacy system is

The term became a synonym for an old system, but age explains little: a 30-year-old program that hardly ever changes can be less work than a six-year-old monolith in which every change breaks something else. Three references help pin down the concept.

The first is from Michael Feathers, in the preface to Working Effectively with Legacy Code (2004): legacy code is simply code without tests. With tests, the behavior of code can be changed quickly and verifiably; without them, nobody knows whether the code is getting better or worse.

The second comes from Meir Lehman, who studied the evolution of large systems from the 1970s onwards. Two of Lehman’s laws say that software used in a real-world application must be continually adapted or it becomes progressively less satisfactory, and that its complexity grows unless someone works to maintain or reduce it. The system ages because the business around it changes.

The third is technical debt. Ward Cunningham coined the metaphor in 1992: shipping first-time code is like going into debt, and every minute spent on code that is not quite right counts as interest on that debt. Researchers at Carnegie Mellon’s Software Engineering Institute (SEI) define technical debt as design or implementation choices that are convenient in the short term but create a technical context that can make a future change more costly or impossible.

Examples of legacy systems

In 2016, the GAO, the US Congress’s audit agency, reported that the US Treasury kept the individual taxpayer master file on a system about 56 years old, written in assembly and running on an IBM mainframe, and that the system that coordinates the country’s nuclear forces still used 8-inch floppy disks. In 2025, of the 11 federal systems the GAO identified as most in need of modernization, eight used outdated languages and seven operated with known vulnerabilities.

In companies, the examples are less exotic: heavily customized ERPs, applications in COBOL, Delphi or Visual Basic 6, Java monoliths tied to old frameworks, billing platforms that grew patch by patch. What they have in common is the business rule that exists only in the code.

Risk signs: checklist

No single item condemns a system. Three or four together usually indicate that the cost of change is already higher than it looks.

  • There are no automated tests in the parts that change most. Without them, nobody knows for sure what a change breaks.
  • The business rule exists only in the code. The documentation describes the system of years ago.
  • One or two people hold the knowledge. If they leave, the operation is exposed.
  • The technology has lost support or has vulnerabilities that can only be fixed by changing the architecture.
  • There is dead code nobody dares to delete. The Knight case shows what happens when it gets called again.
  • The deploy depends on manual steps and on whoever remembers them.
  • Simple changes need a developer. Changing a line of screen text becomes a sprint task.
  • Delivery time grows with the same team.
  • Infrastructure and licensing costs rise with no relation to usage.

Why legacy holds the company back

The code modernization guide Anthropic publishes, The Code Modernization Playbook, describes three trends that, in the company’s view, make digital transformation projects deliver less than they promise. It is material from a company that sells AI models for this work, so it is best read as a vendor’s diagnosis, not as research. All three tend to show up in legacy systems:

  • The team spends more time fixing than building. Bug fixing, debugging and adjustments to hard code take up much of the week, and the new work gets pushed back. The next section brings the most cited estimate of that burden, and the method behind it.
  • It gets hard to find people who know the technology. According to the guide, today’s graduates learn current languages and architectures, and jobs that ask for the old ones get harder and harder to fill. For anyone maintaining COBOL, Delphi or VB6, it is a risk to watch. What to do when that risk has already arrived is in shortage of COBOL, Delphi and VB6 developers.
  • Technical debt becomes a security and compliance risk. Unsupported technology stops receiving fixes, and regulatory requirements keep changing while the system stands still. In Brazil, the LGPD is the closest example. One example is PHP2Shell, from October 2026, which left anyone running PHP 8.1 or earlier without an official patched version.

For the guide, the cause behind all three is lost knowledge. The documentation goes out of date, the people who designed the system leave the company, and the business rule gets trapped in code few people understand. From that comes the fear of touching what "works", when often nobody has checked whether it really does. Feathers reaches the same point by another road: without tests, nobody knows whether a change makes the code better or worse.

Cost of maintaining vs. cost of modernizing

The cost of maintaining a legacy system rarely shows up on a single budget line. The US government is an exception, because it publishes these numbers. According to the GAO, the federal government spends more than $100 billion a year on IT and cybersecurity, and agencies typically report that about 80% of that goes to operating and maintaining what already exists. In 2016, the agency calculated that the growth in this kind of spending had led to a $7.3 billion decline, between fiscal years 2010 and 2017, in money for development, modernization and enhancement.

In the private sector, a widely cited reference is the report The Developer Coefficient (September 2018), a survey Stripe ran with Harris Poll that heard from more than a thousand developers and more than a thousand executives. The developers estimated that, at their company, a developer spends on average 17.3 hours of a 41.1-hour week on maintenance (bad code, errors, debugging, refactoring and adjustments). It is a self-reported estimate, not a measurement, but it gives the order of magnitude.

The burden shows up on the executive side too. Consultancy Protiviti, which also sells modernization services, surveyed 1,050 technology executives, most of them at companies with revenue of $1 billion or more, in its 2023 Global Technology Executive Survey. Almost 70% of organizations said technical debt has a high impact on their ability to innovate. On average, companies devoted 30% of their IT budget and 20% of their resources to dealing with that debt. The sectors with the highest rates were biotech and medical devices (82%), telecommunications (81%) and financial services (78%). These are self-reported answers, from large companies, and not a measurement.

For your system, the numbers almost always already exist inside the company. On one side, hours per change in the most-changed areas, time to production, incidents, infrastructure and licenses. On the other, characterizing current behavior, building the new part beside the old one and keeping both running together for a while. The cost of maintaining is recurring and grows with complexity; the cost of modernizing has a beginning and an end.

To build the calculation for your company (principal, interest and an example formula), see the cost of technical debt: where it shows up and how to measure it.

When to modernize: criteria

Not every old system needs to be modernized. The AWS cloud migration guide includes retain (keep it where it is) and retire (decommission it) among the possible strategies. Four questions help decide:

  1. Does the system need to change? If it hardly receives changes, keeping it may be the right choice.
  2. Does the risk already have a date? End of support, a vulnerability that cannot be fixed without modernizing and dependence on a single person are objective triggers.
  3. Is the cost of each change rising? If it rises every quarter, the debt is piling up.
  4. Is there a first part that can be checked end to end? If there is not, finding it is the first job.

The GAO lists the minimum a modernization plan needs: milestones, a description of the work and what happens to the old system. In 2025, eight of the 11 most critical systems had no complete plan, and the agency links that gap to a higher risk of cost overruns, delays and project failure.

To place the organization on four levels (from reactive to continuous) and work through a checklist, see legacy modernization maturity.

Paths: rehost, refactor, rewrite and strangler fig

PathWhat it isWhen it makes senseLimit
Rehost (lift and shift)Move infrastructure without touching the codeA data center with a closing deadlineThe code’s debt moves with it
ReplatformMove with targeted adjustments, such as a managed databaseCut operating cost without rewritingThe rule still has no tests
RefactorChange the internal structure while preserving behaviorThe system has to keep evolvingWithout an anchor in current behavior, it becomes a rewrite in disguise
RewriteRebuild from scratchRarely for the whole systemThrows away what years of fixed bugs taught
Strangler figBuild the new system alongside and move functions over gradually, until the old one is switched offCritical systems that cannot stopNeeds transitional architecture while both run

Rehosting changes the infrastructure without touching the code. When it still makes sense, and why on its own it does not modernize, is in lift and shift vs modernization.

In 2000, Joel Spolsky wrote that rewriting the code from scratch, as Netscape did, is the single worst strategic mistake a software company can make: the old code carries years of fixed bugs, and throwing it away throws that knowledge away. Martin Fowler named the alternative after the strangler fig, which grows around its host tree until it takes the tree’s place. He says that, most of the time, he saw the plan to build a new system that does exactly what the old one does fail, because it is hard to discover the details of the existing behavior. In both cases, the hard part is understanding what the old system actually does, and that is the work where coding agents come in.

What changes with coding agents and human supervision

Coding agents make it cheaper to read and change a lot of code at once. A detailed account comes from Google: in a 2025 paper on internal migrations done with tools based on language models, the engineers report that, in the switch from 32-bit to 64-bit identifiers in Google Ads, a codebase of more than 500 million lines, 80% of the modifications that landed in the repository were written entirely by AI, and total time fell by about 50% by the team’s own estimate, review included.

The same paper shows where the work stalled. In the identifier switch, an engineer had to undo, in most cases, some of the model’s changes, which were wrong or unnecessary. In another migration, from JUnit3 to JUnit4 (5,359 files in three months), the bottleneck was review speed, and the team deliberately capped the weekly volume of changes so as not to overload the reviewers. Review and deployment, the paper says, still require a human operator. The authors warn that it is an experience report, not a comparative study.

When writing gets cheap, the limit becomes checking what was written. In a modernization with coding agents, supervision has to come in from the start:

  • Characterize before switching. Characterization tests, in Feathers’ sense, pin down what the system does today. Coding agents write them quickly; the team makes sure they cover the rules the business depends on. More in AI refactoring without losing correctness.
  • Humans read what goes to production. The team sets the agents’ autonomy limit and what requires approval before executing. That is level 4 on the autonomy scale proposed by Dan Shapiro, and not a dark factory, in which code goes to production without anyone reading it.
  • Every session is recorded. Request, steps, model, cost, result and authorship. Without that record, nobody can reconstruct later why a part was switched, or who approved it. The detail is in coding agent observability.

That is the design of Ithaca’s agentic development platform for legacy systems. Before any new line, the coding agents read the existing code and documentation, which form the Knowledge base. The new system grows beside the old one, and each part is checked against behavior in production before it goes in. The full method is in legacy system modernization.

Dr. Consulta modernized its subscription system, eight years in production, using Ithaca’s agentic development platform. Infrastructure cost fell 85% compared with the period before the modernization, and a feature that used to take two weeks started shipping the same day (representative example, not a measurement of the whole backlog). Dr. Consulta’s team supervised the coding agents throughout. The numbers, and what the case does not prove, are in the Dr. Consulta case.

Frequently asked questions

What is a legacy system?

It is software that still supports an important part of the operation, but that the team can no longer change safely and at a reasonable cost. It usually lacks tests, up-to-date documentation, people who know the code or vendor support. Age alone does not define a legacy system.

What are examples of legacy systems?

Heavily customized ERPs, applications in COBOL, Delphi or Visual Basic 6, and Java monoliths tied to old frameworks. In the public sector, the GAO cites the US Treasury’s taxpayer master file, written in assembly.

How do you assess a legacy system?

Look at the cost of change, not the age. Check the risk signs: no tests in the parts that change most, business rules that exist only in the code, knowledge held by one or two people, unsupported technology and manual deploys. Three or four together usually mean the cost of change is already higher than it looks. Then ask whether the system needs to change and whether the cost of each change is rising. If several signs apply, the first step with Ithaca is a free assessment: coding agents read the system with your team.

Why does a legacy system hold back innovation?

Because it consumes the time and budget that would go to new things. In consultancy Protiviti’s 2023 survey of 1,050 technology executives, almost 70% of organizations said technical debt has a high impact on their ability to innovate, and companies spent on average 30% of their IT budget on it. Add to that the shortage of people who know the technology and the fear of touching code without tests.

How do you migrate a legacy system without stopping the operation?

In critical systems, a common pattern is the strangler fig: the new system is built beside the old one, and functions move over piece by piece, each one checked before it goes in. A failure is still possible, and some switches may need a maintenance window, but the damage stays limited to the size of the piece.

Is it worth rewriting a legacy system from scratch?

For the whole system, rarely: a rewrite throws away years of fixed bugs and freezes evolution until the new system is ready. Rewriting small pieces, checked against current behavior, is a different decision.

Can you modernize a legacy system with AI?

Yes. Coding agents read and change code in volume, and the limit becomes human review. That is why modernizing with them calls for characterization tests, a team that reads what goes to production and every session recorded.

Request a free assessment

If your system ticked several items on the checklist, the first step is a free assessment: the agents read the system with your team.

Request a free assessment

Start with what weighs most on your backlog.

Tell us what is stuck. After the NDA and access to the code, the agents read the system with your team and show where to start.

Phone is optional. How we use your data, including to measure our ads: Privacy policy.