AivexaNewsSearch
AI news for builders and product teamsChecked every hour

Google Finds That Technical Debt Can Derail Coding Agents through "Agent Distraction"

Collected Nov 10, 2026

Google senior staff software engineer Sam Saccone and senior staff data scientist Madhuri Garikapati, writing in a recent article, described a failure mode they call "agent distraction": AI coding agents pulled off task by stale technical debt left in the codebase, such as old TODO comments, obsolete bug references and outdated specifications. The pair reported the finding from an analysis of distributed traces covering thousands of engineers and hundreds of millions of agent steps.

The mechanism is straightforward once stated. TODO comments that reference a bug ticket tend to survive long after the underlying issue is resolved or abandoned, and an agent reading the file picks them up as context alongside the developer's actual request. The authors note that these stale references no longer sit in forgotten corners of the codebase; they are ingested as context that inadvertently steers the next wave of coders. At best this costs extra tokens and execution time; at worst it pushes the agent toward incorrect logic and decisions.

To measure the effect, the investigators focused specifically on TODO comments tagged with a bug reference. Their method cross-references each TODO an agent encounters against the bug's status and the user's prompt, which lets them separate legitimate work from wasted detours at scale. Roughly 13% of sessions exposed an agent to an inline TODO or FIXME reference. In 6% of those sessions the agent took action aimed at the referenced bug. Most of the time the prompt never mentioned that bug at all.

Breaking down those unprompted detours: 41% involved tickets that were already closed, and 57% involved bugs still open but outside the scope of the developer's request, which the researchers classify as scope creep. The remaining share is not broken out in the summary. The overhead is substantial. Using a multi-way fixed-effects regression with developer-clustered standard errors, the authors found detour sessions carried 70% more steps, 77% more tokens and 105% more wait time. In practice that means a stale comment can more than double how long a developer waits for an agent to finish.

Google's remedy was to build scanner agents that hunt down and clean up obsolete TODOs across the codebase. Confirming that a TODO is genuinely dead is the hard part: in some cases the agents had to walk through years of git history to establish that both the TODO and the intent behind it had been superseded. Only after that confirmation did they open a pull request to strip the outdated reference. Over the last six months this approach removed thousands of truly obsolete references with more than 95% acceptance from human reviewers, according to the authors.

The conclusion is that presubmit analyzers, codebase scanners and automated agents can mitigate agent distraction and improve the effectiveness of coding agents. The result also landed as a talking point outside Google. One commenter described the behavior as junior developer habits at machine speed, where a misleading comment that might cost a person a day now recurs dozens of times an hour with token costs attached. Another focused on the scanner's 95%+ human acceptance rate as evidence that cleanup can be automated without discarding human judgment, and a third suggested the same problem applies to websites, where outdated pages and conflicting information make it harder for AI systems to pick the right answer.

The broader lesson is that a codebase's written artifacts are now part of the model's input surface, not just human documentation. TODO comments, bug references, design docs and specifications were historically consumed by people who could judge their freshness. An agent generally cannot tell a live ticket from one closed two years ago unless something in its pipeline checks. This suggests suppression mechanisms matter: an agent could be given only the text of open tickets, or told to ignore ticket references unless the prompt raises them. Linters and presubmit checks that flag long-lived TODO references could serve the same purpose at low cost, though the investigators report that some stale references require reading years of git history to confirm, which is precisely where an automated agent is more patient than a human reviewer. The trade-off is added process: cleanup agents and scanners become another pipeline to maintain, and the 95% acceptance figure still implies a human gate on the output. The token and latency numbers also suggest that teams watching agent cost should look at repository hygiene as a direct lever rather than treating context quality as a model-side problem only.

Why it matters: teams running coding agents can expect part of their token spend, latency and occasional off-task edits to trace back to comments and docs nobody has revisited. Developers can act on it directly: audit TODO and FIXME references, retire closed bug links, and gate new ones in presubmit checks. Product teams building agents may want scope rules that keep ticket references from entering context unless the prompt asks for them; that is an inference from the reported numbers rather than something Google's write-up prescribes.

Read at InfoQ · AI, ML & Data Engineering

Based on reporting from the original publisher. Visit the source for full context and later updates.

Publisher excerpt

In a recent article, Google senior staff software engineer Sam Saccone and senior staff data scientist Madhuri Garikapati highlighted the cost of agent distraction, where AI coding agents get derailed by stale technical debt, such as old TODO comments, obsolete bug references, and outdated specs, leading them to embark on unrequested "side-quests". By Sergio De Simone