A Memory File Cleans Itself Up
Every session starts the same way: read the memory file, then get to work. Do that for a few months and the file stops being a quick briefing and turns into an archive. A deadline that passed in June is still sitting next to this week’s actual preferences. Two entries describe the same project because they got written on different days by different sessions that didn’t know about each other. The file that was supposed to make you faster to orient now takes longer to read than just asking.
The fix isn’t a smarter memory file. It’s a memory file that periodically rereads itself and throws things out, and it’s something you can actually ask Claude to do today.
How to actually trigger it
You don’t need to explain the process. Just tell Claude to review or clean up its memory: something as plain as “go through your memory files and clean them up” or “consolidate what you’ve saved about me” is enough to match it. Claude will work through your memory directory and its index file (usually MEMORY.md) on its own from there.
If you want it to run on a schedule instead of only when you remember to ask, say so directly: “clean up your memory file the first of every month” sets it up as a recurring task, the same mechanism behind things like a weekly report or a morning brief. You’ll get a short summary each time it runs instead of having to check yourself.
What Claude actually does once you ask
The pass runs in three stages, and knowing them makes it obvious what to check afterward.
First, it takes stock. Claude reads the index and skims every topic file behind it, noting which ones overlap, which look stale, and which are too thin to be worth keeping on their own.
Then it consolidates. This is the real work, and it comes down to a handful of moves. Anything durable, meaning a preference, a working style, a standing relationship, gets kept and sharpened. Anything dated, meaning a specific deadline or a finished task, either gets retired outright or gets reduced to whatever lasting lesson it taught and folded into a durable entry. Two files describing the same person or project get merged into one, keeping whichever version had more in it. Relative time references like “next week” or “by Friday” get rewritten as absolute dates, so they still mean something months later. And anything that just restates what’s already sitting in a calendar or a connected tool gets dropped, since that’s information Claude can pull fresh whenever it’s actually needed instead of storing twice.
Finally, it tidies the index. The index file gets kept under a hard size limit, roughly 200 lines and 25KB, with one line per entry. Pointers to anything retired get removed, bloated lines get cut down to a short hook, and anything newly important gets added.
You’ll get a short readout at the end: how many files got touched and what actually changed. That’s your chance to skim it and flag anything that got merged or cut that shouldn’t have been.
What to say if you want it narrower
The plain version cleans everything. If you only want part of it touched, say so: “just look at the client files, leave the personal preferences alone” or “check for anything about the Peterson project that’s out of date” both work, and Claude will scope the pass to what you named instead of the whole directory.
Why this matters
A memory file that only ever grows isn’t really memory, it’s a log. The whole point of remembering something is being able to act on it quickly later, and a file that takes longer to read every month works against that on a schedule. Asking Claude to run this pass, once in a while or on a recurring schedule, is the difference between a memory file that quietly rots and one that stays worth reading first thing every session.
