I got tired of re-explaining the same context to Claude Code every session, and Claude Code’s built-in per-project memory doesn’t really solve it — it’s scoped to the literal directory you launch from, has a hard line-count ceiling on the index, and treats every fact as equally important forever (or until it silently truncates). So I built a real long-term memory system for it instead, modeled less like a database and more like actual memory:
- Decay — every memory has a strength that decays on an exponential curve (literally the Ebbinghaus forgetting curve), computed at query time. Stuff you mention once and never bring up again fades out of retrieval in a couple weeks.
- Reinforcement — every time something gets recalled, it gets harder to forget. Recall the same fact enough times and it “consolidates” from short-term to long-term (7-day base stability → 90-day).
- Cued/associative recall — this is the part I like most. Instead of one confidence cutoff, weak matches get surfaced separately with hedging language (“this might be related…”) instead of stated as fact, and only get reinforced if you actually confirm they were relevant. A confirmed uncertain guess reinforces harder than an easy direct hit — that’s an actual finding from spaced-repetition research (the “desirable difficulty” effect), not something I made up.
- Non-destructive forgetting — old, unused memories get archived, not deleted. There’s a stricter “cold storage” search for the “wait, I haven’t thought about that in ages” case. It’s wired in globally via hooks (PostToolUse, UserPromptSubmit, SessionStart/SessionEnd), so it works no matter which directory a session launches from, and it captures memory automatically even if a session crashes instead of ending cleanly. Genuine drop-in install — git clone + python3 install.py sets up the venv, wires the hooks, and writes the config. AGPLv3, free, entirely local (ChromaDB + sentence-transformers, no external API calls for the memory itself). Not trying to compete with Mem0/Zep/Letta — those are generic memory layers for any agent stack. This is deliberately narrow: built specifically for how Claude Code actually works, not a generic API you bolt on. Repo: https://github.com/acdesigntech/memory-project Curious what people think, especially anyone who’s hit the same “it forgot everything again” wall. submitted by /u/Vegetable-Water6007
Originally posted by u/Vegetable-Water6007 on r/ClaudeCode
You must log in or # to comment.
