cd /news/ai-ethics/the-new-technical-debt · home topics ai-ethics article
[ARTICLE · art-94890] src=dev.to ↗ pub= topic=ai-ethics verified=true sentiment=· neutral

The New Technical Debt

Gil Zilberfeld, a developer and tester, warns that AI-generated code introduces a new form of technical debt, which he calls 'AI code debt.' He argues that this debt is larger and more dangerous than traditional technical debt because it involves more code, greater complexity, and often unverified code. He advises developers to enforce smaller code generation and use tests to catch issues when refactoring generated code.

read4 min views1 publishedAug 13, 2026

Is AI code debt the new technical debt? As I keep learning, generating code and examining it – it’s worse.

In the old days, we worked hard to create technical debt. Just kidding, it was easy.

Technical debt has many definitions, and origin stories. But one thing is common: We leave the code as it is, knowing it could be better. The debt is the gap of effort of making it better.

And why the gap? Because we know we’ll see that code again. And when we do, it’ll be hard to change. Better code would have made it easier.

Now we’re in the age of genies. They can write any code. They can change any code. Do we need to worry about AI code debt?

Sure we do.

AI code debt is exactly the same as technical debt – we’re leaving the code as it is, knowing it could be better. The gap is still the effort of making it better.

But this time the gap is a lot bigger. There’s a lot more code, it’s probably a lot more complex, and some of it – let’s be frank – is code we didn’t review. So the gap is a lot bigger than we guess.

But that’s a bot problem, right? The code agent will deal with all the needed changes. We don’t need to even look at the code.

Nah, you know you will. You know what code is generated, and it’s not how you would have written it. And coding agents have the same problem of making sense of complex code bases as us.

And they’ll make mistakes.

Cleaning is not just “make it readable”. It’s preparing it for more changes, reducing dependencies and isolating interfaces – all in the context of future plans. And the agent doesn’t have this context.

In fact, it will assume another context, and we get stuck with the code and the assumptions.

Same as always: find the code you know you’ll touch again, and make that code easier to change. The problem starts when you don’t know where that code is.

Because, you didn’t write it. And you didn’t review all of it. If any.

Putting a price on technical debt before was an exercise in imagination. Now it’s pure fantasy.

First know what code was generated. And for that you need to enforce smaller code generation.

If you don’t enforce it, you’ll have a lot more to review. And if that happens you won’t review it all. It’s a human thing. Then, you can wish the genie to refactor it to take the shape you want. Genies are good at transformations. And if the genie breaks something, your tests will tell you.

You do have tests, right?

The old technical debt was based on maintenance work. Now we have bigger maintenance queued up, along with risks of unverified code. Not cool.

So, first, we need to be aware of the AI code debt – we’re creating code that will cost a lot more to maintain, than “regular” code.

Before, we thought “it’s ok, we’ll take care of that later”, and then, when the bill came it was a lot more than we thought.

Now? Expect a much bigger one.

AI code debt is technical debt created by generated code: you leave the code as it is, knowing it could be better, and the debt is the effort of making it better. The difference is scale. There’s more of it, it’s more complex, and some of it was never reviewed.

Not in kind, only in size and visibility. The old debt was something you put there and remembered. This debt arrived while you were reading something else, so you don’t know where it is.

Not on its own. Cleaning up means preparing code for changes you plan to make, and the agent doesn’t have that context. It will assume a different one, and you’re left with the code and the assumptions.

With tests you wrote before the refactor. Directing the genie to reshape code is fine as long as something independent tells you when it breaks.

Originally published at testingil.com.

I'm Gil Zilberfeld. I teach API testing and test automation, and I write about what AI-generated code does to quality.

── more in #ai-ethics 4 stories · sorted by recency
── more on @gil zilberfeld 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/the-new-technical-de…] indexed:0 read:4min 2026-08-13 ·