The Adaptive Alchemist logoThe Adaptive Alchemist
The Adaptive Alchemist logo

Agents are repricing technical debt

Agents pay interest on debt differently than people do, and they make some of it far cheaper to pay off. The debt worth fixing is changing.

·6 min read
Agents are repricing technical debt

A coding agent at Google was investigating a bug when it opened a test file and found a TODO pointing at a different bug. That one had been fixed in 2023. Nobody had deleted the comment, so the agent spent several steps researching a problem that no longer existed.

Sam Saccone and Madhuri Garikapati published that trace in November, in a Google analysis of agent distraction covering hundreds of millions of agent steps. Sessions where an agent took an unrequested detour after a bug-linked TODO used 70% more steps, 77% more tokens and 105% more wait time than sessions without one.

There’s something faintly absurd about paying an agent to research a bug that was already fixed. It’s also the least interesting thing in the data. Agents change what debt costs to carry and what it costs to pay off, and for some debt those two changes pull in opposite directions.

Two problems behind one number

Agents ignored these references 94% of the time. Google’s numbers don’t reveal what the detours cost across all sessions, and tokens aren’t what I’d worry about. I’d worry about the developer who has to stop and pull an agent back from work nobody asked for.

The headline also hides two different problems. About two-fifths of the unprompted detours chased tickets that were already closed. That’s stale information, and it’s a debt problem. More than half went after bugs that were still open, where the comment was accurate and the agent simply widened its own scope.

No amount of comment cleanup prevents the second kind. It’s an authority problem, the one I took on in Autonomy is an architectural property. The first kind is where the economics get interesting.

Debt has always had a variable price

Ward Cunningham’s 1992 report, the one that introduced the metaphor, already holds the idea that matters here: every minute spent on not-quite-right code counts as interest on the debt. Interest accrues per encounter. A stale comment in a file nobody opens costs nothing, while the same comment in a file every change touches gets paid for again and again. That’s why Adam Tornhill’s Software Design X-Rays tells you to hunt for debt where code changes most.

When I built the technical debt simulator, debt grew with every change and dragged on the changes that followed. In Why shipping faster makes teams slower, I argued that AI simply increases the number of changes, so it multiplies whatever friction rate you already have. In The highest-leverage investment in software isn’t AI, it’s structure, I ranked AI last because it doesn’t change the economics of structure. That part still holds.

I modeled one side of the ledger, though. Agents read code differently than people do, and they make some debt dramatically cheaper to clear. A single friction rate can’t capture debt that gets more expensive to carry while other debt gets cheap to pay down.

Agents pay interest differently

An agent doesn’t read a codebase the way the people who wrote it do. It reads widely and treats what it finds as guidance, without the tacit knowledge that tells an engineer a five-year-old TODO is noise. Your team learned to skip that comment years ago. The agent meets it fresh every time.

That changes where interest gets paid. Google’s agents met debt in code they were reading, not just code they were changing. My simulator only charges interest when the system changes. With agents, I expect a real share of the bill to land on reads, wherever stale or tangled code shapes how the agent reasons, though nobody has measured that share yet.

Repayment got cheaper, and verification became the bottleneck

The other side of the ledger moved further. Google’s migration report describes a 32-bit to 64-bit ID migration in Google Ads where 80% of the code modifications in landed changes were fully AI-authored, and engineers estimated the work took half the time. Airbnb moved nearly 3,500 test files to a new testing library in six weeks, against a manual estimate of 1.5 years.

Google’s TODO cleanup fits the same pattern. Agents found references to fixed or obsolete bugs, checked each comment’s history and proposed deletions. Over six months they removed thousands of stale references, and reviewers accepted more than 95% of them.

The costs didn’t vanish. At Google, review was the bottleneck and capped how many changes the team could generate, the same constraint I described in Software is R&D, even when AI writes the code.

Producing a fix got cheap. Trusting it didn’t get cheap nearly as fast.

Repayment is cheap where verification is already cheap, which means mechanical transformations with good tests behind them.

The debt worth fixing changes

The decision rule doesn’t change. Repay a piece of debt when the full cost of fixing it, review included, is lower than the interest you’d otherwise pay. Kent Beck frames tidying as exactly this kind of bet in Tidy First?, and in Technical debt is inevitable. Fragility is a choice. I argued for prioritizing by constraint and business value rather than quotas. Agents change the inputs.

Stale TODOs show how. For human readers they were cheap enough to ignore, so cleaning them up never made the cut. Agents added a reader that occasionally acts on them and turned removal into proposals reviewers approve almost every time. The interest stays modest, but automating the repayment changes the calculation.

The same goes for most dead feature flags and half-finished migrations: misleading to read, mechanical to fix.

Agents change both what technical debt costs to carry and what it costs to pay off.

Debt that weakens verification moves the other way. Agents check their work through tests and CI, so weak tests cap the value of every cheap repayment. Where tests can’t reliably verify the changes, I’d invest in test quality before launching a cleanup campaign.

Architectural debt is the bigger unknown. Tangled boundaries and a domain model that no longer matches the business take judgment and agreement across teams to fix, as Philippe Kruchten, Robert Nord and Ipek Ozkaya argue in Managing Technical Debt. The evidence shows agents make mechanical repayment cheaper. I haven’t found research that measures what they do to the economics of architectural debt, in either direction, and that’s the question I most want answered.

Agents also add debt faster

None of this cancels the accrual side. Researchers at Carnegie Mellon compared 806 open-source projects that adopted Cursor with matched projects that didn’t. The speed boost faded within two months, while static analysis warnings rose 30% and code complexity 41% and stayed there. The researchers identified those quality changes as major contributors to the slowdown that followed.

The loop that worries me hasn’t been measured yet. Existing debt sends agents on detours, and their changes become the next agent’s misleading context, written faster than anyone reviews it.

Find out what it’s worth in your codebase

You don’t need a lab. Run matched tasks against the original codebase, with stale references removed, with a scope guard that checks whether each change is required by the task, and with both. Compare correct completion, unnecessary changes and the full cost of a verified result.

If deletion cuts the closed-ticket detours and the guard cuts the scope creep, you have two problems with two owners. Then measure how often those conditions show up in your real workload, multiply by the cost avoided per affected task, and compare that monthly saving with the cost of the cleanup. That payback period is the number Google didn’t publish, and it’s the one an investment decision needs.

The background became input

Comments are the easiest place to see this, but documentation, retrieved knowledge and agent memory carry the same two prices: what it costs when an agent acts on something stale, and what it costs to keep it current. Memory raises the stakes. A wrong conclusion stored once can influence many later decisions, long after the original source has been corrected.

The people who wrote today’s codebases treated comments and tickets as background. For an agent, that background is input. Some of that old, cheap debt is now worth pricing again, and some of it is finally cheap enough to pay off.


Further reading

Tidy First? by Kent Beck: The economics of tidying, framed as a tug-of-war between discounted cash flows and options, and the clearest guide I know to when cleanup pays for itself

Managing Technical Debt by Philippe Kruchten, Robert Nord and Ipek Ozkaya: The SEI’s treatment of principal and interest, and why architectural decisions are the debt that’s hardest to pay down

Software Design X-Rays by Adam Tornhill: How to find the debt that costs the most by following where code changes

Subscribe to the newsletter

Get notified when new articles are published

Share:

Written by