AI Compass / Knowledge cards
Clearing out outdated plans and notes
so agents don't follow old trails
Before a coding agent like Claude Code gets going, it reads up: the instruction file CLAUDE.md, plans, notes and anything in the code that looks related to the topic. It can’t tell on its own which of this is outdated. A hint about a bug fixed long ago, or a plan nobody has updated, looks to it like an assignment. Google has measured this across millions of sessions. When agents came across old hints about bugs in the code, they followed them up in 6% of cases, mostly without being asked. A session with such a detour needed 70% more steps, 77% more tokens and more than twice as much waiting time.
What it is for
The agent works on your assignment instead of following old trails. You save tokens and time, and discrepancies between plan and code stand out instead of quietly carrying on.
Steps
- Give every plan, ticket or plan section a status: done, in progress, not started or discarded. Then the agent knows whether a missing feature is still to come or was dropped.
- In the
CLAUDE.md: “The code is the source of truth. If a plan differs from it, report it instead of following the plan.” The exception is plans with the status “in progress”; for those, the plan applies. - In the
CLAUDE.md: “Don’t change anything I haven’t asked for.” This targets exactly the unrequested detours that Google measured. - In the
CLAUDE.md: “Before building, check a new request against the existing plans. If it overlaps with them or contradicts them, ask.” That way you update the plan as soon as a requirement changes. - Start a fresh session for every new task, including between planning and building. A long session keeps every failed attempt in its history.
- Have things cleaned up regularly: an agent looks for outdated notes and plans, backs up every finding with the code and the project history, and only reports. Without evidence, a note stays. If a rule contradicts the code, you decide.
- Move whatever you confirm as outdated into an archive instead of deleting it, and forbid the agent from reading the archive, most reliably with a hook, that is, a script that checks before every read access whether the path is blocked.
What Google measured
Google evaluated millions of sessions from thousands of developers. The measuring point was comments of the form TODO(bug/…) that refer to a ticket. In 13% of sessions, the agent came across such a comment. In 6% of these cases it followed up the ticket, in 83% of those without being asked. Just over two-fifths of the unrequested detours concerned tickets that had already been closed. In more than half, the ticket was open but not part of the assignment. Google then had agents look for outdated hints and check their history. Only then did they propose a deletion, and a human decided. In six months, thousands of hints disappeared this way, and more than 95% of the proposals were accepted.
Limits
- Transfer: Google measured hints in code, not plans or instruction files. That the same applies to
CLAUDE.md, plans and memory notes is AI LABS’ transfer. It has not been measured. - Unnamed study: According to AI LABS, Claude Code and Codex followed the outdated file instead of the code in nine out of ten cases in a study, and the rule from step 2 reversed that. The video doesn’t say which study it is.
- Not available: Google’s clean-up agents are internal. The “sweep” skill from the video is only available in the channel’s paid community. Steps 6 and 7 describe what it is supposed to do.
- A clean-up agent can be wrong. That’s why it only reports, and you decide. Google has every proposal reviewed by a human.
- According to the Claude Code docs, rules in the
CLAUDE.mdare context, not a block. Anything the agent must never read belongs in a hook.
Links
- Project start with rules and plan files: how plan files come about. This card keeps them current.
- Maintaining your Claude Code setup – clear out after every model change: clears out instructions and skills; this card clears out plans and notes.
- Keeping context clean – fewer tokens, clearer answers: the history of a long session is a distraction too.
- Memory in three tiers – what Claude knows about you and your projects: memory notes don’t expire on their own.
- Project map instead of rereading – Claude Code with a code map: a project map, too, has to be right after a restructuring.
Sources
- Google Developers Blog, Sam Saccone and Madhuri Garikapati: Agent Distraction, 6 Nov 2026, retrieved 20 Nov 2026
- AI LABS: Google Just Released Something To Fix Claude Code’s Biggest Problem, 17 Nov 2026, 4:22, 6:30, 9:12–12:25. Sponsored by Firecrawl, plus paid community
- Claude Code docs: Memory (context, not an enforced setting; blocks via hooks), retrieved 20 Nov 2026
Status
Checked 20 Nov 2026 · Maturity new (measurement by Google; the rules come from a creator video and have not been independently tested)
You can try this with your team in the AI Lab. See the AI Lab