A memory store that keeps everything forever eventually surfaces stale decisions as if they were current; the retention window and importance-weighted ranking exist to stop that. Worth knowing about scoping: memories are keyed to the repository root, so every directory inside one repo shares a bucket, and outside a repo the working directory itself is the key — which is the usual explanation when stats show no sessions after real work.
A memory server that watches a coding session, writes down what mattered when it ends — decisions, warnings, durable facts — and injects the relevant pieces at the start of the next one. Everything lives in a single SQLite file at `~/.sessionmem/memories.db`; there is no account, no cloud, and nothing leaves the machine unless you turn on the optional cloud summarisation.
- Automatic capture, summarisation and injection — you do not run the steps yourself once it is installed
- Secret redaction before anything is stored: email addresses, API keys, bearer tokens and JWTs, private key blocks and connection-string secrets are replaced with REDACTED
- A retention policy that prunes memories past a configurable window, defaulting to 90 days, so the store does not fill with stale decisions
- Ranking by relevance, recency and importance, with injection trimmed to a small token budget
- A CLI covering the whole store: search, list, show, forget, export, import, stats, savings, redact-scan and retention prune
- Optional team mode — point it at a shared folder, sync, and teammates' memories arrive prefixed with the author, re-redacted on the way in
Node.js and the npm package `sessionmem`, version 1.3.0: `npm install -g sessionmem`, then `sessionmem install` inside your project. That registers the server with your MCP host, writes `~/.sessionmem/config.json` with privacy-respecting defaults if none exists, and adds instructions to `~/.claude/CLAUDE.md`; it is idempotent, so re-running it is the first fix to try. Verify with `sessionmem ping` and `sessionmem stats`. Works with Claude Code, Cursor, Codex, Cline, Windsurf, Antigravity, QCoder and any other MCP host. Cloud summarisation is off by default and needs an `ANTHROPIC_API_KEY` if you enable it.
One command — npm install -g sessionmem
