Skip to content
Stale TODO Comments Make AI Coding Agents Waste 70% More Steps, Google Study Finds

Stale TODO Comments Make AI Coding Agents Waste 70% More Steps, Google Study Finds

Google's analysis of millions of coding agent sessions shows that 13% encounter stale TODO/FIXME comments referencing bug tickets; when agents pursue these unrequested, sessions use 70% more steps, 77% more tokens, and 105% more wait time, with 41% of pursued tickets already closed.

AI Frontier Lectures
AI Frontier Lectures
AI Frontier Lectures

Study Overview

On November 6, Google researchers Sam Saccone and Madhuri Garikapati published findings from an internal analysis of their coding agent's behavior. The study examined trajectories from thousands of engineers and over hundreds of millions of individual steps, using naturally occurring TODO(bug/...) and FIXME(bug/...) comments in the codebase as signals.

Prevalence of Stale Bug References

In file-reading sessions, 13% encountered comments pointing to bug tickets. Humans typically scan past these, but the agent stops and queries the referenced ticket's current status and relevance to the user's task.

Example of a TODO(bug/XXX) comment in source code
Example of a TODO(bug/XXX) comment in source code

Quantitative Impact of Unrequested Detours

When the agent pursued a bug ticket without being asked, the session incurred significant overhead compared to sessions without such detours:

Steps: +70% (confidence interval +54% to +87%)

Tokens: +77% (confidence interval +60% to +96%)

Wait time: +105% (confidence interval +86% to +126%)

These figures come from regression controlling for developer identity, codebase complexity, task type, model version, number of files read, initial prompt length, and the step index where the comment appeared. All three metrics had p < 0.0001.

Bar chart showing steps, tokens, and wait time increases with confidence intervals for sessions with vs without unrequested bug-ticket pursuits
Bar chart showing steps, tokens, and wait time increases with confidence intervals for sessions with vs without unrequested bug-ticket pursuits

Behavioral Breakdown

The agent's response to bug-reference comments follows a funnel:

13% of file-reading sessions encounter a bug-reference comment.

Of those, 6% proceed to act on the ticket (94% skip).

Of the 6% that act, 83% were not requested by the user (denominator is the 6%, not all sessions).

Among unrequested pursuits:

41% targeted tickets already closed: 32% fixed, 9% explicitly won't-fix.

2% were duplicate or restricted tickets (excluded from the 41%).

57% targeted tickets still open; the agent expanded the work scope. Of these, 61% only investigated, 39% modified code.

Funnel diagram: 13% encounter comment → 6% act → 83% unrequested → split into 57% open (61% inspect, 39% edit) and 32% fixed, 9% won't-fix
Funnel diagram: 13% encounter comment → 6% act → 83% unrequested → split into 57% open (61% inspect, 39% edit) and 32% fixed, 9% won't-fix

Remediation: Automated Cleanup

Google subsequently deployed an agent to clean up stale references. The process: identify comments referencing tickets marked fixed or invalid, examine the ticket, file, and commit history (sometimes spanning years), and only propose deletion after confirming both the comment and its underlying intent are obsolete. Over six months, thousands of such comments were removed with a code-review acceptance rate exceeding 95% .

Implication

Extra steps on an agent's bill do not necessarily mean the task was harder. A single outdated comment pointing to a closed ticket — invisible to human eyes — can trigger costly, unrequested work. While only a minority of encounters lead to pursuit, each pursuit substantially inflates steps, tokens, and latency.

Source: Google Developers Blog — https://developers.googleblog.com/agent-distraction/
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

software engineeringGoogletechnical debtcode maintenanceempirical studyai-coding-agentsagent distractionTODO comments
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.