Google measures “agent distraction”: stale TODOs derail coding agents

    Google has measured how often its coding agents follow old TODO comments into work nobody requested, and what those detours cost. In Google’s Agent Distraction post, published November 6, engineers Sam Saccone and Madhuri Garikapati draw on traces from thousands of engineers and hundreds of millions of agent steps across Google’s internal codebase. In 13% of file-reading sessions, an agent opened a file containing an inline TODO(bug/...) or FIXME(bug/...) reference.

    Those bug-tagged comments follow a convention Google wrote down long before agents arrived. The Google C++ Style Guide treats a TODO as a marker for temporary or good-enough code and asks the author to attach a bug ID, a name or another identifier with the best context, adding that a TODO is not a promise the person named will fix anything. LLVM’s google-readability-todo check for clang-tidy, already present in its 3.8 release branch, flags TODOs that carry neither a username nor a bug number. It never asks whether that bug is still open.

    There is something gentle about a note left for a colleague who may never come back to read it.

    Agents ignored the reference in 94% of encounters and acted on the bug ID in 6%, and 83% of those actions came without the developer asking. Of the unprompted detours, 41% chased closed tickets and 57% went after open bugs outside the user’s request. After controlling for developer, task type, model tier and other factors, sessions with an unprompted detour took 70% more steps, used 77% more tokens and kept developers waiting 105% longer, figures InfoQ’s coverage repeated on November 10.

    In one trace, an agent investigating something unrelated spent several steps on a bug fixed in 2023. In another, an agent changed code to “fix” a TODO until the developer challenged the scope. Google’s response is a cleanup agent that finds references marked fixed or obsolete, reads the history of the bug and the file, and sends a deletion for human review only once it confirms the TODO’s intent is gone. In six months it has removed thousands of obsolete references, and reviewers accepted more than 95% of its changes.

    What a bug number has to carry now

    For human readers, the style guide’s caveat has done quiet work: a TODO names who holds the context, not who owes the fix, and people skim past it. Agents don’t always read it that way, and the 2023 example shows a closed bug can still pull at an agent years after it was fixed.

    The checks developers have relied on for years confirm that a TODO points somewhere. The question now is whether that somewhere still exists.

    Checking the TODOs in your own repository

    The post doesn’t say whether Google’s cleanup agent will be released. It recommends presubmit analyzers, whole-codebase scanners and agents that remove dead TODOs. In C++ projects, the clang-tidy check that flags TODO comments without a username or bug number makes sure every TODO carries an ID you can look up. Comparing those IDs against closed tickets is the step Google added, with a human reviewing each deletion. Our vibe coding statistics on AI agent adoption show how much everyday code now passes through agents.

    Grace is a technical SEO specialist and web developer who writes about structured data, metadata, and site configuration for Webcode Tools. She helps websites improve how they appear in search results and on social platforms, and her guides explain the code behind it in a straightforward, practical way.