Google researchers found that stale TODO comments, obsolete bug links and outdated specifications can divert AI coding agents into unrequested work. They call the problem “agent distraction”: old context remains visible to the model even when the issue has already been resolved or falls outside the current task.
An analysis covering thousands of engineers and hundreds of millions of agent steps found that about 13% of sessions exposed agents to inline TODO or FIXME references. Agents acted on those references in 6% of exposed cases. Among unprompted detours, 41% targeted closed tickets and 57% pursued open bugs that were outside the user’s request.
The detours were associated with 70% more steps, 77% more tokens and 105% more waiting time per session. Google built scanner agents that inspect code and history before proposing removal of obsolete references; human reviewers accepted more than 95% of those cleanup changes over six months. The findings make code hygiene an AI operations issue: comments that people learn to ignore can become expensive instructions for automated workers.