Earlier quoted context omitted.
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.
But there's risk associated with every change, and it takes time to review, QA, monitor the rollout, communicate to stake holders, etc.
The refactor itself may be the smallest part of it.