Introduction
AI coding agents are powerful within a single conversation, but they usually begin each new session with no memory of what came before. Decisions made yesterday—coding conventions, architectural constraints, or business rules—must be re-explained today. A tool called claude-mem promises to close that gap by giving agents persistent memory across sessions. I ran a controlled experiment to find out whether it actually works, and what the convenience costs.
What Happened
I created a small invoicing project containing seven Python files and a hidden business rule: discounts are capped at 30 percent, stored as basis points, and applied before tax. During the first session, I asked the agent to fix a bug and shared that rule. In the second session—a brand-new chat—I asked it to add percentage discount support without repeating the instruction.
I tested the second session three ways: with claude-mem active, without it, and without it but with the rule typed out again. With memory enabled, the agent built the feature correctly in all three runs. Without memory, it failed all three times. When I manually repeated the rule, it succeeded again, showing the agent was capable but simply lacked the context.
The stack used OpenCode with a free deepseek model and a free-tier Gemini key serving as the observer. Installation required manual workarounds, including bypassing a browser login prompt and selecting a lightweight Gemini model to avoid exhausting the daily request quota.
Why This Matters
Perfect recall is the headline, but the economics are the real story. Every request with claude-mem added roughly 5,200 tokens of context overhead. Most of that comes from fixed tool definitions injected by the MCP server and the plugin's search tools. On a small codebase, that is more expensive than re-typing a short instruction. The trade-off only pays off when the context you would otherwise repeat is large, or when you are likely to forget to repeat it.
There are operational risks, too. Capture is handled by a second model, so it is probabilistic. In reliability tests, important facts were stored three times out of three, but through different paths each time, and the end-of-session summary was written only once. For anything critical, explicitly triggering a save and checking the local viewer is safer than assuming automatic capture worked.
Key Takeaways
- claude-mem delivered perfect cross-session recall in every memory-enabled test run.
- The overhead is approximately 5,200 additional tokens per request, driven mainly by fixed tool definitions.
- Wall-clock time remained essentially unchanged whether memory was on or off.
- Automatic capture is not guaranteed; critical facts should be saved explicitly.
- Privacy settings such as telemetry, image retention, and redaction are not all enabled by default and should be reviewed before team use.
Conclusion
claude-mem does what it advertises: a decision from yesterday's session reaches today's session without manual repetition. For long-running projects where much of the context consists of conventions, past failures, and business rules, that is genuine value. It also pairs well with approaches that compress a single session's history, since one keeps the current window small while the other carries key details forward.
Before adopting it, budget for the token tax, avoid running the observer on a tightly rate-limited free key, and treat explicit saves as a safety net for anything you cannot afford to lose. On a large codebase, the balance between fixed overhead and saved exploration may shift, but for small tasks, re-explaining the rule remains cheaper.

Discussion
Join the conversation
Thoughtful reactions, questions, and follow-up ideas help shape the next story.