This is just junior dev behavior at machine speed,
Ryan White emphasized, describing how AI coding agents chase misleading code comments.
Google software engineers Sam Saccone and Madhuri Garikapati reported that agent distraction increases token consumption and execution time while risking incorrect decisions. Obsolete specifications, resolved bugs, and lagging documentation in codebases misdirect AI coding systems during software development tasks.
To measure this impact, investigators focused on inline TODO(bug/…) comments that linger long after development teams resolve or abandon the underlying issues. Google examined distributed traces from thousands of software engineers and hundreds of millions of agent steps to track how often AI systems encounter these stale references.
Approximately 13 percent of sessions exposed agents to inline TODO or FIXME references according to the investigation. Agents targeted the referenced bug in 6 percent of those exposed sessions, even though user prompts did not mention the bug.
AI agents worked on closed tickets in 41 percent of those unprompted detours. They targeted open bugs outside the developer’s requested scope—classified as scope creep—in 57 percent of those detours.
Multi-way fixed-effects regression with developer-clustered standard errors showed that detours add substantial operational overhead per session. Affected sessions required 70 percent more steps, consumed 77 percent more tokens, and added 105 percent more wait time.
Google developed automated scanner agents to identify and clean up obsolete TODO items across the repository. These scanner agents inspected years of git history to confirm that both the TODO comment and its original intent were obsolete before submitting pull requests to remove the references.
The todo cleaner removed thousands of obsolete references over a six-month period. Human reviewers accepted more than 95 percent of these automated pull requests.
Presubmit analyzers, codebase scanners, and automated agents help mitigate agent distraction and improve AI effectiveness, according to the investigators. X user Tulasiram noted that comments function as active context for models. Awais Raza highlighted on LinkedIn that high human acceptance rates demonstrate that cleanup tasks can be automated without losing human judgment.
Muhammad Zohaib added that outdated pages and conflicting information likely create similar obstacles for AI systems on websites.
Related research detailed in Searching for Build Debt: Experiences Managing Technical Debt at Google published by research.google describes parallel efforts to measure and pay down technical debt found in BUILD files, dead code, dependency specifications, unbuildable targets, and unnecessary command line flags.
This is a useful reminder that comments are context too. I try to tie actionable TODOs to an issue or owner and retire resolved ones, so an agent or a teammate doesn’t mistake a stale note for a current requirement.
This is just junior dev behaviour at machine speed. Leave a misleading comment and someone chases it for a day. Except now it happens 40 times an hour and you're paying for the tokens.
Worth a look