Skip to content

AI Compass / Knowledge cards

Clearing out outdated plans and notes

so agents don't follow old trails

Checked Prompting Automation

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

  1. 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.
  2. 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.
  3. In the CLAUDE.md: “Don’t change anything I haven’t asked for.” This targets exactly the unrequested detours that Google measured.
  4. 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.
  5. Start a fresh session for every new task, including between planning and building. A long session keeps every failed attempt in its history.
  6. 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.
  7. 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

Sources

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