Logic Foundry

Build with understanding.

Stale TODOs can send AI coding agents beyond the task, Google researchers report

Screenshot

In a report published on November 24, 2026, Google senior software engineer Sam Saccone and senior data scientist Madhuri Garikapati described a problem they call “agent distraction”: AI coding agents can treat outdated repository context as work to be done, even when a developer has not requested it. Examples include stale TODO comments, references to resolved bugs and obsolete specifications.

The researchers focused on TODO(bug/...) comments. They compared TODOs encountered by agents with the referenced bugs’ status and the developers’ prompts to identify work that appeared to fall outside the request. Analyzing distributed traces from thousands of engineers and hundreds of millions of agent actions, Google found that agents encountered inline TODO/FIXME references in about 13% of sessions. In 6% of those cases, an agent acted on the referenced bug.

Most of those actions occurred without the prompt mentioning the bug. Among these unprompted detours, 41% concerned closed tickets; 57% concerned tickets that remained open but were outside the developer’s request, which the researchers classified as scope creep.

Using a multi-way fixed-effects regression model with standard errors clustered by developer, the researchers associated the redundant actions with 70% more steps, 77% more token use and 105% more latency per session. Those figures describe the study’s estimated overhead, not a guaranteed cost for every encounter with a stale comment.

Google also developed scanning agents to identify outdated TODOs. In some cases, an agent examined years of Git history before confirming that a comment and its original purpose were obsolete; only then did it submit a pull request to remove the reference. The researchers said the cleanup tools removed thousands of genuinely outdated references over the preceding six months, with more than 95% approval from human reviewers.

The practical lesson is not to delete every TODO. A comment can still describe valid work, including an open bug that is simply outside the current task. Checking its history and intent before removal helps keep repository context useful without turning cleanup into another source of mistakes.