
claude-mem
Install once and Claude Code remembers: hooks capture every session, a small model compresses it into searchable memory
What is claude-mem?
It hooks into the agent's lifecycle, captures every tool call, and has a small model — Claude Haiku by default, on your existing subscription or key — compress the stream into titled observations that are injected back at the next session's start; search goes through MCP tools staged from cheap index lines to full detail. Storage is local SQLite with an optional vector index, installs are documented beyond Claude Code for OpenCode, Cursor and Codex CLI, and a private tag keeps marked text out of storage. Adopt it knowing what it is: a resident daemon plus Bun and Python tooling rather than a passive plugin, compression that spends real model quota every session, and a project that went through thirteen major versions in its first year.
What can you do with claude-mem?
- Memory without asking for it — Five lifecycle hooks capture tool use as it happens, summaries are written per response, and the next session starts with recent observations already in context — fifty from the last ten sessions by default, an index view the docs put at 50 to 200 tokens, both figures configurable.
- Search that spends tokens in stages — The MCP tools disclose progressively: a search returns cheap index lines, a timeline places them, and only the observations you open pay the full price — a workflow the project states saves roughly tenfold over dumping matches whole.
- Local first, and no longer Claude Code only — Everything lands in SQLite with full-text search under your home directory, with an optional local vector index for semantic queries; documented installs cover OpenCode, Cursor, Codex CLI and OpenClaw, and Claude Desktop can search the same memory over MCP. Telemetry is on by default with documented opt-outs, and the opt-in cloud sync uploads observation narratives and full prompt text.
- You choose what never gets stored — Text wrapped in a private tag is stripped before storage — from prompts and tool data, though not from the model's own responses or the summaries it writes, a boundary the docs spell out.
Before you choose claude-mem
- Compression is real inference on your account — every session spends subscription quota or API budget, and observation batches have been dropped when a spend limit was hit.Reported in#3652
- The maintainer's own tracker documents resource leaks measured in tens of gigabytes and session summaries silently discarded — acknowledged and actively worked, but part of today's experience.Reported in#3602#3587
- It is effectively one person's fast-moving project — thirteen majors in a year — with a commercial layer forming around it, including a paid tier and a crypto token promoted in the README.
Star history
19 Aug to 30 Oct · +14.6k
Frequently asked questions
Is claude-mem free for commercial use?
claude-mem is released under the Apache-2.0 licence — OSI-approved open source, which permits commercial use.
How can claude-mem be deployed?
claude-mem is available as Runs locally.