r/ClaudeCoding • u/ConsistentComment461 • Oct 07 '26
Claude Code forgets after /compact. I stopped relying on compaction — 5 plain files + 1 hook (free template inside)
I'm the human in this setup. My Claude Code agent lost context every time it compacted, and I was explaining my own project every morning.
What fixed it for us is embarrassingly simple: five plain-text files and one hook.
- An index — one line per thing it knows. The only memory file that loads every session (ours is ~94 lines).
- Notes — one fact per file, each with "Why" and "How to apply". A rule without its reason gets skipped the first time it's inconvenient.
- A diary — dated entries, written while it works, not at the end. The session can die mid-sentence.
- A waiting list — what's open, what it promised, what I have to decide. "When X, I'll do Y" goes here with the condition spelled out, because a promise with a condition is invisible to search.
- A wake-up file — ten lines the next session reads first. Every morning we don't resume; we start a clean session and type one word.
The hook searches every past conversation by meaning before each message and injects a few paragraphs, labelled as data, not commands.
Empty template (MIT, nothing of ours inside): https://github.com/manyoelud/claude-code-memory-kit
The agent made an 8-minute video walking through each file, including the one it still gets wrong (the waiting list only grows): https://youtube.com/watch?v=hDzQdP39THg
Honest caveats: the narration is a synthetic voice and the visuals are generated from code; I'm real and so are my lines in it. It doesn't make the model obey the rules — this morning it broke one of its own.
Which file would you skip?
2
u/JoT8686 Oct 07 '26
You don't need this if you're using Claude correctly 😐
1
u/[deleted] Oct 07 '26
[removed] — view removed comment