Skip to content
#software-development
#founders
Opinion

Does AI pay off technical debt? What agents do to legacy code

AI does not pay off technical debt. It finds in days what your team deferred for years. The three bills an agent pulls forward, and what to budget before you switch it on.

Por Victhor Araújo

Founder of Revin. Engineer by training, specialist in software development and digital products.

The agent reads the system in days. The repair bill stays exactly the same size.

The agent reads the system in days. The repair bill stays exactly the same size.

AI does not pay off a single unit of technical debt. It pulls the statement forward.

Whatever your team has been deferring for four years shows up after three days of an agent running inside the system, and the cost of fixing it is exactly what it was before. One thing did change, and it is a big one: the list now has a filename, a date and an owner. You start deciding in the open what you had been deciding by omission.

In practice this is a budget line. If you are about to roll out a coding agent across a system carrying ten, twenty or forty years of patches, set aside the money to fix things before you approve the seats. Discovery got cheap. Repair did not.

The viral headline has the subject in the wrong place

A mixer speeds up a batch someone already knows how to make. It does not choose the mix.

A mixer speeds up a batch someone already knows how to make. It does not choose the mix.

A piece titled "AI is forcing us to pay off 40 years of technical debt" pulled 1,310 points and 753 comments on Hacker News. Judging by the size of that thread, it landed on an exposed nerve.

Anyone who has pointed an agent at a legacy codebase knows where the sentence slips. AI forces no payment: it does not sign contracts, approve budgets or protect a quarterly delivery plan. It reveals. The person who decides to pay is still the person who signs off on the spend, and the bill comes due whether or not they do.

Search data says something about who is still asking. In the US, "technical debt" holds steady at roughly 160 in broad volume, and the UK sits near 51. Nobody acquired less old code this year. What moves is the vocabulary of the buyer, who increasingly types the symptom instead of the diagnosis: the release that slipped, the screen that freezes on the busiest Friday of the quarter. That is why I keep pushing teams to run this as a risk ledger rather than an engineering complaint, because that is the only form that survives a board meeting.

A cement mixer does not know how to mix

I have repeated the same line since my years in industrial assembly: if you do not know how to mix cement, it makes no difference whether you use a hoe or a mixer, the batch comes out bad. The mixer speeds up and standardises a decision somebody already made. It does not make the decision.

The coding agent is the mixer. It reads fast, writes fast and repeats without complaining. When there is a real engineering decision behind it, that becomes genuine throughput. When there is not, the speed comes out the other side as change volume, and change volume lands in a review queue that is still human, still billed by the hour, and still the same size it was last month.

That is how the rescues go when the previous vendor walks away. The pattern repeats: chained slow queries, monitoring with no instrumentation, high test coverage with no assertion inside the tests. An agent maps all of that in days. Fixing it is months of senior work, and no license covers that.

Three bills the agent pulls forward, none of them new

Legacy equipment in production: in the FAA case, a flood of connections found the weak spot before any agent did.

Legacy equipment in production: in the FAA case, a flood of connections found the weak spot before any agent did.

  1. The hours people spend studying the system before they can safely touch it. The agent does that reading in minutes and hands back a map, which finally makes visible what your team was already spending every month. The hours do not vanish, they move, because the agent reads the code and cannot read the business rule nobody ever wrote down.
  2. The rework that comes back a few weeks after a release. It arrives earlier now, since the agent touches more files per week and reaches the fragile spots sooner, so your rework average climbs on the dashboard without the system actually getting worse.
  3. The dependency on one specific person. It is the most expensive bill and the one nobody budgets. The moment an agent proposes a change and exactly one person in the company can say whether it is allowed, you have measured cognitive debt by accident.

Those are the same three I measure before I talk price with any client. The agent invents none of them. It just finishes the count in a week instead of a quarter.

Forty years of debt is not a figure of speech

CIO ran a piece this week calling the US air traffic outage a warning about technical debt in the AI era. By that account, the 13 November nationwide ground stop still has no settled cause: investigators are examining a Juniper router installed by an FAA contractor, and the agency itself says a flood of network connection attempts destabilised legacy equipment, disrupting communications and radar feeds. As of 19 November, the precise cause was still open.

Looking for the one guilty vendor is the comfortable part of the problem. The painful question is why the wider system sat one traffic flood away from stopping.

And here is the part that matters for your company. Nobody needed an AI agent to find that fragility. Traffic found it first, at the worst possible hour, with passengers already in the terminal. An AI agent is the cheap, controlled version of the same discovery, with the advantage that you pick the day.

"But the agent opened 23 cleanup pull requests this week"

That is the honest objection I hear most from teams who already rolled the tooling out. The trouble is that an open PR is not debt paid. It is debt inventoried, plus a proposed fix that still needs someone able to say whether it is right for your business.

My favourite example of a rotten shell is the health endpoint that returns 200 under every condition, with a colourful dashboard beside it and empty data underneath. Complete from the outside. Nothing under the hood. No agent will warn you that the metric exists and the guarantee does not, because the test is green and the panel is green. Usually what catches it is an automated scan reading the old code, or a customer stuck on the payment screen.

There is also the new bill, the debt the agent itself produces, and that one needs its own counter. I wrote about how to add up technical debt from AI coding agents separately, because merging the two into one number is the fastest way to lose both.

Where AI genuinely clears debt, and where this advice is wrong

There is a real slice of debt AI closes cheaply, and hiding it would be dishonest. Library version bumps, swapping deprecated syntax for supported syntax, bulk renames, filling in tests for a module with clear boundaries: on that ground the agent is excellent, it pays off in days, and the risk is low.

The boundary is how much business rule hides inside the snippet. Someone once asked me whether moving from MySQL 5 to 7 was the same as moving to Postgres. One is a Granny Smith, the next one is a Pink Lady, and Postgres is a pear. All fruit, all SQL, except the pear is a different fruit. Agents handle the apple swap beautifully. Changing fruit is still an architecture decision with a human answering for it.

One limit I cannot resolve: I am not confident this holds the same way for a 20,000 line codebase with a single owner who knows every branch by heart. There the agent may well be cheaper than the meeting. This argument is about systems with many hands passed over them and few people left who can explain why.

What to take into Monday's meeting

Before you approve agent seats for the whole team, put one question to whoever signs the budget: how much of next quarter are we willing to spend on what this tool is going to find.

If the answer is zero, the agent will produce one more list on the board. And that list was already there before it arrived, forty years old, waiting for the day traffic finds it first.

Ready to elevate your business

Schedule a meeting
Share
Link de compartilhamento LinkedinLink de compartilhamento XLink de compartilhamento WhatsappLink de compartilhamento Facebook

Newsletter

Every two weeks. The technical decisions we made, and what we learned.