Clogmeter
Open Clogmeter and weigh your instruction files → Free, browser-only. Token counts, duplicates, conflicts, trimmed export — nothing uploaded.

Home · Guides · Tuesday 3 Nov 2026

Keep AGENTS.md and CLAUDE.md from going stale

Developers keep asking the same thing: after a refactor or folder move, the agent still follows the old instructions, recreates deleted directories, or runs a command that no longer exists. The cause is simple. An instruction file reads as authoritative, so the agent has no reason to doubt a line that stopped being true weeks ago. Nobody reviews it the way they review code.

The fix is not a bigger file. It is a smaller one that you check on a schedule. Here is a routine that takes about ten minutes.

Why files go stale

A ten-minute staleness check

  1. Check every path. List the paths and file names the file mentions and confirm each still exists. A quick way is to pull anything that looks like a path and test it, as in the snippet below.
  2. Run every command. Each build, test and lint command in the file should work from a clean checkout. If you would not paste it into a new teammate's terminal, remove it.
  3. Look for contradictions. Search for “always” and “never”, and for rules about the same topic (formatting, test style, error handling). Two lines that disagree are worse than none, because the model has to guess which one wins.
  4. Delete what the repo already enforces. If a linter, formatter or CI check catches it, the instruction file does not need to repeat it.
  5. Weigh it. Paste the file into Clogmeter to see its token count, its share of a 32k, 128k or 200k context window, and any duplicate or conflicting rules it flags. Trim the highest-cost sections first.

Find dead paths in a few lines

This shell snippet prints any backtick-quoted path in AGENTS.md that does not exist in your repo. It is a rough filter, so expect to skim the output rather than trust it blindly:

grep -oE '`[A-Za-z0-9_./-]+/[A-Za-z0-9_./-]*`' AGENTS.md \
  | tr -d '`' | sort -u \
  | while read p; do [ -e "$p" ] || echo "missing: $p"; done

Habits that stop it coming back

No tool can tell you whether a rule is still true. Clogmeter measures size, duplicates and always/never conflicts, so the path and command checks above still need a human or a script.

Quick check

Count the file with the AGENTS.md / CLAUDE.md token counter, or use the CLAUDE.md token counter if that is the file you maintain. Then run the full inspector for duplicates and conflicts.

Open Clogmeter and weigh your instruction files → Free, browser-only. Token counts, duplicates, conflicts, trimmed export — nothing uploaded.

No spam. Unsubscribe anytime. We never share your email.