Skip to content
audiotale.net
Sign in

Google: stale TODO(bug) comments add 77% more tokens to coding-agent sessions

Google engineers measured how stale bug-reference comments pull AI coding agents off task, and removed thousands of them in six months.

audiotale.net team

· 6 min read

Written by AI from the sources linked below. How we use AI

On this page
  1. Key points
  2. What happened
  3. Background
  4. The numbers
  5. How it works: the clean-up
  6. What it means
  7. What we don't know yet
  8. What to watch next
  9. Sources

Google engineers say stale TODO(bug/...) and FIXME(bug/...) comments are a measurable drag on AI coding agents: in a Google Developers Blog post published on 6 November 2026, they report that unprompted detours triggered by those comments added 70% more steps, 77% more tokens and 105% more waiting time to a session. Most of the time the agents ignore the comments. The problem is the small share of cases in which they do not, and it argues for a chore many teams have put off for years: deleting dead TODOs.

Key points

  • The post, "Agent Distraction" by Sam Saccone and Madhuri Garikapati of Google, analysed traces from thousands of engineers covering hundreds of millions of agent steps.
  • In 13% of sessions in which an agent read files, it was shown a TODO(bug/...) or FIXME(bug/...) reference.
  • Agents ignored the reference in 94% of encounters; in the other 6% they acted on the bug ID, and 83% of those actions were unprompted.
  • Unprompted detours added 70% more steps, 77% more tokens and 105% more wait time per session, with all three effects at p<0.0001, controlling for developer, codebase complexity, task type, model tier, files read, prompt length and where in the session the comment appeared.
  • Google used agents to remove thousands of obsolete references over six months, with over 95% acceptance from human reviewers.

What happened

Coding agents spend much of a session reading. Before they change anything they open files, follow imports and look for the code that matters. Along the way they meet comments that people wrote for people: TODO(bug/1234234): handle the empty case. For a human, a bug reference is a note to skim past or to look up later. The authors' summary line is: "What is easy for humans to skim past in code, agents see as a call to action."

The Google team measured how often that happens. They cross-referenced each TODO an agent encountered against the live status of the bug it referenced and against the user's prompt, to tell apart detours the user asked for from those the agent chose by itself. They used a multi-way fixed-effects regression with developer-clustered standard errors so that effects could not be explained by who was working, how hard the codebase was or which model tier was in use.

The headline numbers are modest in rate and large in cost. A reference showed up in 13% of file-reading sessions, and 94% of the time the agent did nothing with it. In the remaining 6% of encounters the agent acted on the bug ID. Of those actions, 83% were unprompted. Of the unprompted detours, the post says 41% chased bugs that were already closed (including some fixed or verified, some obsolete or won't-fix), and 57% chased bugs that were still open. Among detours on open bugs, 61% only looked the bug up, while 39% went on to edit code.

Two anecdotes illustrate the pattern. In one, an agent spent effort investigating a bug that had been fixed in 2023 but was still referenced in a file. In another, an agent made an unrequested code change to resolve a TODO and later, when challenged, admitted that the scope increase was wrong.

Added cost per session from unprompted TODO detours%
Added cost per session from unprompted TODO detours (%)
%
Wait time105
Tokens77
Steps70

Source: Google Developers Blog, "Agent Distraction", 6 November 2026

Background

That models can be derailed by irrelevant text is not new. A 2023 ICML paper, "Large Language Models Can Be Easily Distracted by Irrelevant Context" (Shi et al.), built a grade-school maths set with extraneous details added to the problems and found accuracy dropped sharply, even with strong prompting techniques. It also reported two mitigations: self-consistency decoding, and telling the model in the prompt to ignore irrelevant information.

Chroma's July 2025 technical report "Context Rot" reached a related conclusion about length: across 18 models, performance became less reliable as inputs grew, and distractors that are topically close to the question lowered accuracy further, with the effect growing with input length. Its authors write that "models do not use their context uniformly".

Those studies used constructed tasks. What is new in Google's post is the field measurement: real engineers, real repositories, and a cost expressed in steps, tokens and minutes. The authors do not claim agents are naive. They claim that a codebase is also input, and that its stale parts are not neutral.

The numbers

The cost is not spread evenly. Because 94% of encounters are ignored, the average effect across all sessions is small, but the sessions that go astray get materially longer: more steps, more tokens, more waiting. For a team paying per token or running agents in a loop, a 77% token increase on affected sessions is a direct bill. For a developer, 105% more wait time is the difference between a coffee break and a lost afternoon.

We did not find in the post the absolute length of an average session, the number of engineers beyond "thousands", or which agents and model tiers were studied. Treat the percentages as Google-internal results from Google's own tooling and repositories, not as a benchmark you can compare with your own.

How it works: the clean-up

The remedy Google describes is also agent-driven. Agents scanned the codebase for references to bugs marked fixed or obsolete. Before deleting anything, they reviewed the bug history, the file history and changes to the surrounding code, in some cases spanning years, and proposed removal only when they could confirm that the TODO's intent was obsolete. Over six months this removed thousands of obsolete references. Human reviewers accepted more than 95% of the proposals.

The authors recommend three things: use presubmit analyzers, whole-corpus scanners and automated agents to find and clean up dead TODOs; revisit clean-up projects that were deprioritised as low value, since agents operating at scale make stale debt more costly; and treat an "agent-friendly" codebase as one whose neglected corners are tidy too, not only its hot path.

What it means

For teams using coding agents. The practical first step is a cheap audit. List every TODO and FIXME that points at a tracker ID, check each ID's status, and delete or rewrite the ones that are closed. A comment that says what is wrong in plain words ("this ignores empty input; tracked in the roadmap, not planned for 2026") is harder for an agent to mistake for an instruction than a bare ID. You can also say in your agent's instructions file that bug references in code are context, not tasks. That helps, but it is a mitigation, not a measured fix: the post does not test it.

For tool builders. If agents treat any actionable-looking text as work, then scoping matters: a rule that an agent should only change what the user's prompt covers, and should report rather than act on side discoveries, would address the scope-creep cases directly. The post stops short of proposing that, and we do not know whether Google's agents already have such a rule.

For managers. The finding turns a low-prestige chore into a measurable one. If cleanup shortens agent sessions by double-digit percentages when the problem occurs, it can be justified in the same way as any build-time optimisation.

For related reading on keeping agents on task, see our guide to how to audit the plugins, hooks and MCP servers your AI coding agent loads.

What we don't know yet

  • Which agents, models and languages were in the sample (the post as we read it does not say), and whether the effect is the same for other vendors' agents.
  • The absolute length of an average session, and so the absolute minutes and tokens lost.
  • Whether instructions telling an agent to ignore tracker IDs reduce the 6% that act on them.
  • Whether the same pattern shows up with other stale material: old design docs, outdated README sections, commented-out code.
  • The post links no paper or code, so the analysis cannot be independently reproduced from what is published.

What to watch next

Watch for a fuller write-up or dataset from the authors, for agent products that add explicit handling of tracker references, and for other large engineering organisations publishing their own field measurements of how repository hygiene affects agents.

Sources

Written by

audiotale.net team

The official account of the people who run audiotale.net: announcements, conversation starters and the newsroom's drafts. Posts written with AI say so. Every other account here is a real person.