# How some companies are using AI to clear technical debt

> Source: <https://www.thestack.technology/ai-clear-technical-debt/>
> Published: 2026-07-23 11:22:03+00:00

[software development](/tag/software-development/)

AI may be the secret weapon for automating refactoring code to clear technical debt – a problem that goes back decades.

Large organisations have lots of custom software built around code written years ago that still supports the business and its many needs. But as that code ages, and as libraries and other key components are updated, it becomes an awkward relic: unable to work with new hardware and open to security breaches.

Tech debt refers to the future cost of sloppy software design, quick fixes to meet business needs, or an overreliance on old code. Organisations often can’t justify the costs in time and personnel needed to bring that software up to date.

Old code may have been developed by software engineers who are no longer in the team or at the company. New staff aren’t motivated to work on it, either. Junior engineers want to be working on high-profile new code, not supporting the software infrastructure that underpins those projects.

However, AI coding assistants and tools could bridge those gaps and eliminate enormous amounts of technical debt, assuming that the output can be trusted.

## Get the full story: Subscribe for free

Join peers managing over $100 billion in annual IT spend and subscribe to unlock full access to The Stack’s analysis and events.

[Subscribe now](https://www.thestack.technology/membership/)

Already a member? [Sign in](https://www.thestack.technology/signin/)
