
Google has described an internal cleanup system that finds outdated project notes that can send coding agents into unrequested work. The system is not publicly available, but Claude Code users can apply similar checks to their own project files. Stale instructions can lead an agent away from its assigned task, even when the requested work is eventually completed, according to AI Labs.
Explore how a source-of-truth rule helps Claude resolve conflicts between code and older plans, and how ticket status preserves room for unfinished work. The preview also covers a sweep skill that checks project notes against code and history, reports potential conflicts for review, and archives approved removals rather than deleting them outright.
Why Agents Follow Outdated Information
TL;DR Key Takeaways :
- Claude Code reads project instructions and plans into its context, so outdated notes can lead it to make unrequested changes.
- Google found that about one in seven sessions encountered a bug note; when agents pursued a note, more than four times out of five nobody had requested it. Side-quest sessions used 77% more tokens and took more than twice as long as sessions that stayed on task.
- A study found that Claude Code and Codex followed an outdated project file instead of the app nine times out of 10. Researchers also found that agent-written instruction files increased task costs by about 20% without improving performance.
- In testing, a rule to trust code over conflicting plans reversed the nine-out-of-10 result. Ticket statuses, instructions to leave unrelated work alone, and fresh sessions can also help keep work on track.
- Google’s cleanup agents checked bug records and code history before proposing note removals; engineers accepted more than 95% of suggestions. A proposed project sweep similarly checks plans and notes, reports potential issues for approval, and archives unneeded files.
Claude Code reads project files to plan a task before it starts building. It loads CLAUDE.md at the start of each session and can also read plans and requirements in the specs folder. Everything it reads enters its context, including instructions or notes that no longer match the app.
An old bug note or abandoned feature plan can give an agent work that nobody requested. Even a correct, unsolicited change can create work for you: the agent might alter something you meant to keep as it was, or implement a feature you planned to build differently.
Google calls these diversions side quests. To measure them, it examined developer notes in code that linked to bug records. It checked whether each bug had already been fixed and whether an engineer had asked the agent to address it.
Across millions of sessions from thousands of Google engineers, about one in seven sessions encountered one of those notes. Google found that when an agent pursued a note, nobody had asked it to do so more than four times out of five.
Of the side quests Google measured, 41% pursued already-fixed bugs and 57% pursued bugs that were still open without a request to fix them. Compared with sessions where the agent stayed on task, sessions with a side quest took 70% more actions, used 77% more tokens and took more than twice as long. An agent can still complete the requested task after a diversion, so you may not notice the extra work.
How Project Instructions Become Stale
A study found that Claude Code and Codex followed an outdated project file instead of the app nine times out of 10. In the reviewed project, an agent likewise continued to follow CLAUDE.md when it disagreed with the app.
The size of the instruction file can matter too. Claude reads the whole file in each session, including sections unrelated to the task. Researchers found that agent-written files of this kind made each task cost about 20% more, without improving agent performance. As rules accumulate, they can also contradict each other, leaving Claude to choose between them without asking.
Claude’s memory adds another source of old information. It saves notes when corrected, and those notes do not expire. In a second brain made up of notes, there may be no app against which you can check whether an old entry is still accurate.
Even current project files do not prevent a session’s context from accumulating failed attempts and other old material. Chroma found all 18 models it tested became less reliable as context grew longer. People have also reported completed plans returning when a long Claude session is compacted.
Requirements can change faster than project documents. After a change in direction, an agent can build an email-only login while leaving a requirements document that still calls for Google sign-in. A later session reviewing the plan could mistake the dropped option for unfinished work.
Explore further guides and articles from our vast library that you may find relevant to your interests in Claude Code agent workflows.
- Anthropic Adds Persistent JavaScript Mods to Claude Code
- Claude Code 2.0 Quickly Builds Custom Websites from Text Prompts
- 27 Claude Code Concepts Explained : Prompts, Permissions, Tools, Memory & More
- $20 ESP32 Paired with Claude Code to Automate Programming, Tasks and Projects
Rules That Keep Claude on Task
The proposed setup puts a source-of-truth rule in CLAUDE.md: Claude should trust the existing code over a conflicting plan and report the difference. In testing, this rule reversed the earlier nine-out-of-10 result, with agents following the code instead of the outdated file.
Ticket status gives that rule an exception for unfinished work. Marking a ticket completed, in progress or not started helps Claude interpret a feature that appears in a plan but not in the code. If a ticket is in progress, Claude can follow its plan rather than treat half-built code as the finished design.
Another CLAUDE.md rule can tell Claude to leave unrelated work alone. In one test, Claude Code did no extra work when told what to leave untouched; without that line, it exceeded the request much more often.
For a request that is not already a ticket in the specs folder, a further rule can require Claude to compare it with existing plans before building. If the request overlaps with or contradicts a plan, Claude can flag the conflict and ask whether to proceed, giving you a chance to update the document.
AI Labs also recommends a fresh session for each task, including the move from planning to building. That keeps failed attempts from an earlier task out of the new session’s context, although it does not remove outdated notes already stored in the project.
Google’s Cleanup and a Project Sweep
Google built agents to search files for notes about bugs that had been fixed or dropped. A note that appears old can still be important, such as a warning that a bug may return if surrounding code is removed. Before suggesting deletion, Google’s agents checked the bug record and the history of changes to the relevant code, including changes from years earlier.
An engineer reviewed every proposed removal. Over six months, the check cleared thousands of notes, and engineers accepted more than 95% of the suggestions.
You can ask an agent to create a sweep skill that applies a similar history check to project plans and notes. The skill compares them with the current app and project history, then reports potential issues instead of immediately fixing them. If there is no proof that a note is outdated, the proposed skill leaves it alone.
Claude places the skill in the skills folder inside .claude, with its rules and phases in SKILL.md. Before reporting findings, the setup sends the claims to a checking agent without the main agent’s suspicions. It lists a memory or rule that conflicts with code separately for you to resolve, rather than automatically labelling it outdated.
After you approve the report, sweep moves unneeded files into an archive retained as a record. A hook runs a script before the agent reads, searches or edits, blocking reads of archived files. In the reviewed app, sweep found that CLAUDE.md still named a products page and its old locations after the page had been moved to the catalog.
Google’s system is not open for everyone to use, so reproducing the approach requires a setup in your project. You can use Claude Code’s monitor and loop features to ask Claude to build a similar system, but they stop when the session closes and cannot keep checking over days or weeks. The sweep skill and the other materials are available through the AI Labs Pro community.
If you use Claude Code and want help finding outdated project notes and plans, the sweep skill is worth a closer look.
Media Credit: AI LABS
Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, Geeky Gadgets may earn an affiliate commission. Learn about our Disclosure Policy.