My AI agent said 18. The real number was 69.
I told the agent most of my orphaned notes were daily notes. It checked carefully and told me I was wrong.
My notes live in an Obsidian vault, and an AI agent, Claude Code, helps me keep it tidy. While cleaning up notes that linked to nothing, I said it looked like most of them were daily notes. The agent ran a full scan, found 18, spot-checked three, and ruled it not a bug. The real number was 69 of my 191 daily notes.
How the agent got it wrong
Later that day, the scan reported vault-wide orphans dropping from 741 to 146, mostly from adding parent links to auto-generated notes. Then, working through what was left, it found a bug in its own scan script. The script keyed notes by filename. Most daily notes share a name with an automatic digest in another folder, so one overwrote the other, and the scan never saw 236 notes across the vault. Both of those numbers came from the broken script, so neither was real.
The next day, rerun with every note keyed by its full path, the scan found 69 daily notes with no links in either direction. My hunch had overreached, but it pointed at a real problem. The audit had been careful, confident, and wrong.
The orphans had two causes:
- The script that creates daily notes wrote a skeleton with no links and no frontmatter. Every new note started life as an orphan.
- The Daily Notes plugin had no config, so notes I made by hand landed in the vault root as stray empty files.
The fix
We chained the daily notes together. Each one gets a line under the title pointing at the day before:
Previous: [[2026-01-01]]
A one-off script added it to all 191 notes, and a second run changed nothing. The creation script now adds the same line. We configured the plugin and deleted the empty files.
A corrected scan of the whole vault then found 72 orphans. We fixed 41. Most of the rest are orphans on purpose: templates, command scaffolding, and notes meant to stand alone.
The same lesson, twice
Claude Code loads only the first 200 lines of a project’s memory index at the start of a session, so old entries crowd out new ones. I wrote a monthly audit where a read-only agent suggests what to delete. In its first run, 36 “delete” verdicts became 6 after I checked them. Another confident audit, another overcount.
Terms of use
Notes the agent reads go to the model provider under its terms. Decide what you’re fine with sending before you point an agent at your notes.
Where it ended up
Solved. Daily-note orphans went from 69 to 0. Notes made by the creation script link to the day before.
The bigger lesson: an agent’s audit is a claim, not a fact. When the number and your hunch disagree, check the script behind the number.
