Google: Outdated TODOs in Code Sidetrack Its Agents, Adding 77% More Tokens per Session
Analyzing millions of sessions from its internal coding agent, Google shows that bug-linked TODO comments—often already resolved—lead agents into unsolicited detours that cost 70% more steps, 77% more tokens, and 105% longer wait times.

To a human developer, a TODO(bug/1234) comment forgotten three years ago is mere background noise that blends into the file. To a coding agent, it is an invitation to take action. An analysis published on November 6 on Google’s developer blog quantifies at scale what these lingering remnants cost when autonomous agents navigate source code.
A Simple Proxy: Bug-Linked TODOs
Manually measuring agent “distractions” across millions of sessions is impossible. Authors Sam Saccone and Madhuri Garikapati found an automated indicator: TODO(bug/...) and FIXME(bug/...) comments, which link directly to issue tracker tickets with known statuses. By cross-referencing each comment the agent encountered against the bug’s status and the developer’s original prompt, the researchers separated useful work from unintended side quests.
The dataset covers traces from Google’s internal coding agent used by thousands of engineers, totaling hundreds of millions of steps. 13% of file-reading sessions encounter such a comment. In 94% of instances, the agent ignores it. In 6%, it acts on the referenced bug, and 83% of those interventions were never requested.
Closed Bugs and Scope Creep
These detours take two main paths. More than two out of five target already-closed tickets: long-resolved bugs (32%) or abandoned ones (9%). In over half of the cases, the bug is still open, and the agent takes it upon itself to expand its scope: either investigating (61%) or modifying code (39%) that nobody asked it to touch. Google notes instances where an agent, while tracking down an unrelated issue, went digging into a ticket resolved back in 2023, or another that unilaterally “fixed” code before the developer pushed back.
The bill adds up fast. Controlling for developer, code complexity, task type, and model tier, a session derailed by an unsolicited detour incurs 70% more steps, 77% more tokens, and 105% longer wait times.
The Fix: Janitor Agents
Google deployed specialized cleanup agents tasked with spotting references to closed bugs, then reviewing the history of the issue, the file, and the surrounding code—sometimes spanning multiple years—before proposing a deletion. In six months, they have stripped out thousands of obsolete TODOs, boasting an acceptance rate of over 95% from human reviewers.
Our take
The study translates an everyday engineering intuition into a concrete invoice: documentation debt, long written off as harmless, now exacts a direct toll in tokens and wasted minutes. The TODO comment is merely a convenient metric; outdated specifications and lagging documentation likely cause identical friction, even if they are harder to quantify automatically. The playbook is easy enough for small teams to replicate: audit TODOs linked to closed tickets and submit pull requests to remove them. Two caveats remain: all findings stem from Google’s proprietary internal setup using unnamed models, and the raw dataset has not been made public.
Sources
A primary source comes directly from the company, lab or organization concerned. A secondary source reports the information without being its author: we flag it as such. Spotted an error? See our corrections policy.


