Research#Coding agent

Google: stale TODO comments send coding agents on 70% longer detours

A Google study of internal traces found 13% of coding sessions showed agents stale TODO/FIXME refs, and 6% chased bugs nobody asked for, adding 70% more steps.

A hand-drawn beach scene where a line of footprints veers off course toward a distant shoreline

Google published “Agent Distraction” on its Developers Blog on November 6, 2026, and used distributed traces from its own production systems to put a number on something developers have felt: stale TODO(bug/...) comments in a codebase get read by coding agents as work assignments, and the resulting detours are expensive. In 13% of sessions the agent encountered one of these inline references; in 6% it acted on the linked bug, and 83% of those actions were something the developer never asked for. Google’s regression estimate puts the cost at 70% more steps and 77% more tokens per session.

Key points

  • Scale and method: the study draws on distributed traces from thousands of Google engineers and hundreds of millions of individual agent steps. It is observational production data, not a public benchmark, and Google names no repositories, task sets, models, or agent products.
  • How often it happens: 13% of sessions exposed the agent to an inline TODO(bug/...) or FIXME(bug/...) reference; in 6% the agent took action on that bug, and 83% of those actions were unprompted.
  • The cost: after controlling for developer, codebase complexity, task type, model tier, number of files read, initial prompt length, and the step where the reference appeared, unprompted bug detours added 70% more steps, 77% more tokens, and 105% more wait time per session (p<0.0001).

Background

Technical debt used to be priced as maintenance work: a comment goes stale, the next person spends a few minutes checking it, and the worst case is a fix in the wrong place. Coding agents change that premise. They read broadly during the planning and research phase, so a comment stops being a note for humans and becomes part of the model’s input. Google’s own framing is blunt: what a person skims past, an agent sees as a call to action, and the ability to take side quests scales with the tools and skills the agent has.

This is not the first time we have written about AI and technical debt. Our November 4 story on IEEE Spectrum’s analysis of AI and technical debt covered the reverse direction: AI turning long-dormant bugs into working exploits faster than teams can fix them. Here the mechanism runs the other way — old comments pull the agent toward work nobody requested. Our October report on Linus Torvalds using Claude Code for a kernel patch fits the same picture: agents now run many steps inside real repositories, so a misread comment compounds across the trajectory.

The facts

Google uses TODO(bug/...) as an automatically checkable proxy, for a practical reason: TODOs tend to survive long after the underlying bug is resolved or abandoned, and the linked ticket is a canonical record. For every TODO an agent encounters, the study cross-references two things — the current status of the referenced bug and the user’s prompt. Confirming that a comment was stale sometimes meant reading years of git history.

MetricGoogle’s stated figure
Sessions where the agent saw an inline TODO/FIXME reference13%, about one in seven
Sessions where it then acted on that bug6%
Actions the developer never asked for83%
Unprompted detours chasing closed ticketsOver two-fifths: 32% fixed or verified, 9% obsolete or won’t-fix, 2% duplicate or restricted
Unprompted detours chasing open ticketsOver half; 61% lookup only, 39% edited code
Extra cost per sessionSteps +70%, tokens +77%, wait time +105% (p<0.0001)

The post walks through two real trajectories. In the “Obsolete Detour,” an agent investigating an unrelated bug reads // TODO(bug/XXX) in SurfaceControlTest.java; the bug was fixed in 2023, the comment was still there, and the agent spent several steps digging into it. In the “Eager Agent,” an agent encounters a TODO in the bug it is already investigating and, unprompted, changes ModelDownloaderV1; a human later challenges the scope creep and the model concedes it expanded the task. Google calls both cases trivial-to-minor detours, but they still cost time, tokens, and human intervention.

Google also describes its cleanup. Agents scan the codebase for bug references marked fixed or obsolete, then check the history of the bug, the file, and the code changes — sometimes spanning years — to confirm that both the TODO and the intent behind it are obsolete before sending a pull request to delete the reference. Over six months, the cleaner removed thousands of genuinely obsolete references with more than 95% acceptance from human reviewers.

What others say

Google’s post gives no repository count, no task set and no model list, and describes the 70%/77% baseline only as “per session” with no control-group definition — a correlation estimated from production traces, not an experiment anyone can rerun. InfoQ’s English edition (November 10) and Chinese edition (November 24) repeat the same numbers and both render the closed-ticket share as 41%; Google says “over two-fifths” and breaks it into 32%, 9% and 2%, which is how this entry states it. This article follows the primary breakdown.

Hacker News stayed quiet. Two submissions, on November 7 and November 14, sat at 2 and 3 points with zero comments as of November 24. One explanation is that all the data is internal to Google — no public benchmark, dataset, or per-model breakdown — so outside developers have little to check and little to add. Google’s own caveat is narrower than the headline: the best case is extra tokens, steps, and time; the worst case is an agent “grounded on falsehoods,” making incorrect logic and implementation decisions.

Our take

This is not a finding that comments make AI dumb. It is an observational result from production traces, and the authors use a multi-way fixed-effects regression with developer-clustered standard errors to control for developer, codebase complexity, task type, model tier, files read, prompt length, and where the reference appeared. There is no randomized control and no cross-company replication. The 70%/77% figures are modeled per-session uplift, not the gap between two medians in an A/B test; reading them as “any stale comment costs 70% more steps” overstates the result.

For teams, the practical shift is that TODO hygiene becomes an input-quality problem for agents, not just a style issue. A reasonable first step is to treat TODO(bug/...) and FIXME(bug/...) as a queryable inventory and check whether each linked ticket is still open. For the closed or abandoned ones, either delete the comment or rewrite the intent so it still holds. Google’s experience is also a warning against deleting on sight: the cleaner confirms that both the comment and its intent are obsolete, because some TODOs are still load-bearing.

The honest limits are clear. The data comes from one company, and neither the models nor the repositories are public; different agents, languages, and teams may see very different ratios. The safer reading is a signal that this debt is worth cleaning, not a law that every stale comment adds 70% more steps.

What to watch

Google published no paper, benchmark, or dataset alongside the post. Whether the effect generalizes will depend on outside teams reproducing it on public repositories, or on Google releasing a per-model and per-task breakdown. Until then, the most actionable move is still to walk your own TODO(bug/...) references once.