AIs struggle with tech debt as much if not more than humans.
Ive noticed that theyre often quite bad at refactoring, also.