Absolutely. I really don't think the future will be humans reading and picking apart an AI-generated codebase, there will be tech debt agents or whatever running overnight.
I think you misunderstand why tech debt lingers around. It's not a capacity or capability problem.
Organisations just don't want to deal with the accountability involved with "touching cold code". Whether it's a human or "AI agent" doesn't change the "It worked in prod, you touched it, you broke it, never touch anything again" dynamic.
That's one dimension of it, but in the context of this thread we are talking about how maintainable a codebase is for other humans. If your codebase is messy you depend on a few key employees and it might be hard to onboard new ones, so there has always been financial incentives to reduce tech debt.
Um, no, actually AI makes it better because the cost is lower now. I'm not sure what point you're trying to make here, obviously organizations already fight against tech debt all the time through a variety of means?
The point there is that it is MUCH easier to get corporate to agree to something when the cost is nebulous and being paid anyway. If you get a senior dev to clean up some tech debt, how much did that cost the company? The dev will have some multiple things at the same time, so you can't cleanly assign a number of hours, maybe multiple people are involved. It's practically just an unknowable. Practically, $0.
So your proposal to handle tech debt created by "AI" being unable to do good engineering is... throw more AI at it? There's a saying about the definition of insanity which comes to mind.
Organisations just don't want to deal with the accountability involved with "touching cold code". Whether it's a human or "AI agent" doesn't change the "It worked in prod, you touched it, you broke it, never touch anything again" dynamic.