What an Old System Knows: Why AI Agents Can’t Simply Rewrite It

I have been developing software for more than 25 years, most of that time enterprise systems: B2B portals, back-office applications and, for the past few years, security-critical infrastructure. And I now work with AI agents every single day. In my own time I build complete applications with them on my own, from architecture to deployment, at a pace that would have been unthinkable three years ago.

So this is not a piece against AI. It is a piece against a mix-up I keep running into: confusing generating code with being responsible for a system. If you want the basics of how the models behind these agents are steered, see How to Write Better AI Prompts. This article is about practice.

The appeal of a fresh start

Any system that has been in service for seven or eight years does not look pretty from the outside. The interface feels dated, some parts have grown over time, and anyone looking at it fresh thinks: we could rebuild this properly in a few weeks today.

With AI agents, that thought suddenly seems realistic. A few prompts, a few late nights, and there is a modern interface that can do everything in the demo that you show it. That is exactly the problem: in the demo, and everything you show it.

What an old system knows

A system that has been in production for years is not just code. It is an archive of decisions that someone, at some point, made for a good reason:

  • Edge cases that only occur at a single customer but are business-critical there.
  • Bug fixes whose cause nobody remembers, but which stop a particular fault from coming back.
  • Quirks of the other side: devices, clients and third-party systems that interpret a standard in their own way. The specification says A, reality does B, and the code handles both.
  • Permission logic that has been adapted over years to real organisational structures.
  • Compatibility that other systems rely on, often without it being documented anywhere.

None of this is in a ticket, and none of it shows in an interface. An agent that rebuilds a system only knows what it is told. And you can only tell it what you know yourself.

Generating a new interface is easy. Fully replacing an existing system is a completely different task.

Two columns: visible in the demo are the interface, standard workflows, main features and sample data. Hidden in production are edge cases of single customers, old bug fixes, quirks of other systems, grown permission rules and undocumented dependencies.
Most of what an old system knows cannot be seen.

Where AI agents really shine

From my own experience, this is not theoretical praise:

  • Prototypes and proofs of concept take hours instead of weeks.
  • Agents reliably write boilerplate, forms, data models and simple admin screens.
  • Tests, refactorings and explanations of unfamiliar code are much faster.
  • An experienced developer with good agents today has the impact of a small team.

The crucial part of that last sentence is: an experienced developer. Agents amplify what you bring. Good architecture becomes good architecture faster. A lack of understanding becomes a great deal of code that nobody understands, faster.

Where it gets dangerous

Especially with security-critical software, admin interfaces and anything that controls configuration, permissions or chains of trust, I see five risks:

  • Missing reviews: if generated code is never read by someone who knows the domain, nobody has checked that it does the right thing. It only does something that looks right.
  • Security by demo: what works in a demo is the normal case. Attacks, misconfigurations and edge cases do not appear in demos.
  • Audit and compliance: in regulated environments it is not enough that something works. You have to be able to show why, how and who checked it.
  • Maintainability: code that nobody on the team understands becomes a problem at the first production fault. Then someone is searching through thousands of generated lines in the middle of the night.
  • Accountability: when something goes wrong after go-live, a person has to answer for it. The agent cannot.

The parity trap

The most common mistake in thinking I see is: the new system can already do 80 per cent of what the old one does.

The first 80 per cent are the visible features. The remaining 20 per cent are exactly the edge cases, fixes and quirks from above, and they often hold most of the real value. Teams usually only notice once the old system has been switched off and the first customers call.

Two tiles: the first 80 per cent are visible features, built quickly and shown in the demo. The last 20 per cent are edge cases, fixes and quirks, slow and laborious, and noticed only in production.
The value often sits in the invisible rest.

What I would advise decision-makers

Replacing a long-running system with the help of AI can make sense. If you do it, do it like this:

  • Involve the people who know the old system instead of working around them. Their knowledge is the specification that exists nowhere in writing.
  • Run parity tests against the old system: same inputs, same results, automated.
  • Plan a shadow phase: the new system runs alongside without making decisions yet.
  • Have security and architecture reviews done by experts, not by the same agent that wrote the code.
  • Migrate step by step, not on a fixed cut-over date.

The strongest combination today is not “agents instead of developers”. It is experienced developers with agents. Anyone who swaps one for the other saves costs in the short term and buys risk in the long term.

Five steps: gather the knowledge of the people who know the old system, run parity tests with the same inputs and results, a shadow phase that decides nothing, security and architecture reviews, then switch over step by step instead of on a fixed date.
Five steps instead of a cut-over date.

A word about teams

Software is still made by people who take responsibility. Teams that deliver under time pressure, put in evenings and weekends and keep a system stable for years notice very clearly whether that work is seen. Appreciation costs nothing. Its absence ends up costing exactly the knowledge you would have badly needed for the next rebuild.

Conclusion

AI agents are fundamentally changing software development, and anyone who ignores that is making a mistake. But they shift the work rather than replace it: away from typing, towards understanding, checking and taking responsibility.

Rewriting an old system is faster with agents than ever before. Replacing it properly still takes people who know what the old system actually did.

Rating: 4.90/5. From 24 votes.
Please wait...


The Tech Crates editorial team. Tech Crates is run by Carsten Kraft, an IT consultant and software developer from Germany with more than 25 years of experience in enterprise software and a specialist in PKI and certificate management (carsten-kraft.com). Practical tech guides since 2010.