I built a cross-session memory system for my agent a few weeks back — four markdown files it reads before doing anything non-trivial: bugs.md for known issues and their fixes, decisions.md for why things were built the way they were, key_facts.md for usernames, endpoints, scopes, run commands, and issues.md as a work log. It fixed the thing I built it for: the agent used to forget everything between sessions and re-litigate decisions I'd already made. Problem solved.
Then last week I asked it to set up a GitHub token for a new OSS contribution, and it confidently told me: "scopes needed: repo, user — add delete_repo if you'll be deleting repos." Straight from key_facts.md. Completely accurate quote. Also missing a scope, because three weeks earlier I'd hit a wall pushing a branch to a stale fork — GitHub rejected the push because the branch dragged in upstream's .github/workflows/*.yml changes, and OAuth apps need an explicit workflow scope to touch those. I fixed it, wrote it up in bugs.md the same day, and never went back to update the one-line scope summary in key_facts.md. The agent wasn't hallucinating. It was citing a real file, accurately, that had quietly stopped being complete.






