any15 minbeginnerverified: claude-fable-5, 2026-07
SOP: Set up agent memory that improves instead of rots
When done, your agent remembers decisions, preferences, and repo quirks across
sessions — and the file stays small enough to keep helping. 15 minutes.
Before you start
- [ ] Know your tool's memory surface: Claude Code → CLAUDE.md (+ auto-memory
dir if enabled), Cursor → Memories/rules, Hermes → memory tier, others →
a MEMORY.md you @-mention.
Steps
- Split memory from instructions. Instructions = how to work (style,
- Define what earns a memory — write this into the memory section header:
- Install the write habit. End-of-session line in your instructions:
- Install the prune habit (the step everyone skips). Monthly (or every
commands). Memory = what was learned (decisions, quirks, preferences).
Create the sections; never mix them.
✓ Check: two clearly-headed sections (or two files).
`
Save: decisions with reasons ("we use X because Y"), non-obvious repo
quirks, corrections I've given twice. Don't save: anything derivable from
the code, one-off task details, secrets. One line each, dated.
`
✓ Check: header present.
"Before finishing a task where I corrected you or a decision was made,
append the one-line memory."
✓ Check: after a session with a correction, the file gained exactly one
dated line.
~20 entries): "Prune the memory section: delete entries now visible in the
code, merge duplicates, flag contradictions to me." A memory file over ~80
lines is due regardless of calendar.
✓ Check: run it once now, even on a young file — the habit is the product.
Verify the whole thing
Start a fresh session and ask: "what do you know about this repo's quirks?"
It should recite your memories, not re-derive from scratch.
Rollback
Memory is additive — delete the sections. Nothing else changes.
When it breaks
| Symptom | Cause | Fix |
|---|---|---|
| Memory file balloons with trivia | no "don't save" rules | step 2's negative list does the real work — tighten it |
| Agent contradicts a saved memory | stale entry, code moved on | prune pass; memories carry dates so age is visible |
| Same correction needed repeatedly | correction never became a memory | say "remember this" explicitly — twice-corrected = mandatory save |
Changelog
- 0.1.0 (2026-07-04) — initial, verified on Claude Fable 5.
One email when a pack ships or gets re-benchmarked on a new model. No noise.