跪拜 Guibai
← Back to the summary

claude-mem hits 100,000 stars by compressing coding-agent sessions into SQLite and Chroma

100k stars for memory: claude-mem compresses coding agents' fragments into SQLite, is it worth installing?

Look at the numbers. In a GitHub snapshot taken by Anchor Terminal on October 30, claude-mem had 105,550 total stars, adding 1,145 that day. On the same day's all-language daily chart, memory projects took several prominent spots: Hindsight at 56,437 stars, +1,454 that day; MemPalace also made the Python daily chart. Eleven days earlier, the AI Memory project had gained 3,793 stars, a relative increase of 35%, the largest relative gain among the seven projects in the previous chart.

Created in late August 2025, this repository reached 100k stars not because of a new model or framework, but because of something anyone using a coding agent daily has hit: close the session, and the agent forgets you. This article breaks down what claude-mem actually stores, how it stores it, how it differs from other memory approaches, and the pitfalls to know before installing it.

Shut the session, and the context resets to zero

Anyone working with Claude Code or Codex knows the feeling. Spend three hours debugging a bug yesterday; today you open a new session, and the agent asks about the project structure from scratch. Last week you settled on a tech choice; this week it recommends the exact opposite. The model didn't get dumber; its memory lives only in the current session.

The cost of these fragments is calculable. Each new session means either spending ten minutes re-explaining context or having the agent rescan the repository; both burn tokens. The hidden cost is worse: it will step in the same traps it already stepped in, and re-propose options already rejected. The larger the project, the more expensive the repetition. A detail many miss: the context generated by rescanning the repo is not free; it eats into the window the session actually has for doing work.

There's an even subtler waste: when the agent rescans the repo, the files it reads push genuinely useful context out of the attention window. You think it got stupider; actually it spent its budget on re-acquainting itself with you. In long sessions the squeeze is not noticeable because it happens in the background; but the bill doesn't lie, and the repetitive labor at the start of every new session is real token expenditure.

The community has a name for this: the session gap. The memory projects clustering on this GitHub chart all target this seam. Anchor Terminal's report puts it bluntly: for anyone using agents daily, the blank between two sessions remains the most visible gap.

What claude-mem does behind the hooks

claude-mem is authored by Alex Newman, hosted under thedotmack, Apache-2.0 licensed, current version 15.2.0, requiring Node >=20. It self-describes as a persistent-memory compression system for Claude Code, but its install commands already cover OpenCode, T3 Code, Antigravity CLI, Pi, DeepSeek Harness, and a separate script for the OpenClaw gateway.

Its pipeline has four steps. First, lifecycle hooks automatically capture tool-call observations while the agent works: which file you edited, which command ran, which error you hit, all recorded. Second, a model compresses those observations into semantic summaries; raw log lines don't enter the database; this is where "compression" comes from. Third, summaries land in a dual-layer store of SQLite plus Chroma: structured data goes to the former, vector retrieval to the latter. Fourth, a local worker exposes an HTTP endpoint and four MCP tools for the agent to do tiered retrieval.

The tiered retrieval is the design most directly tied to token savings. The agent first uses a coarse-grained tool to find candidate entries, sees the cost of that level, then decides whether to pull full details. The official term is progressive disclosure. In other words, memory is not stuffed back into the context all at once; it is fetched by layer, paying only for the layer you use. The companion mem-search skill fixes the query flow into three steps, so the agent doesn't reinvent a retrieval approach each time.

The division of labor between the two stores deserves a word. SQLite handles structured facts and indexes: which observation belongs to which session, project, or type; such queries are fastest in a relational store. Chroma handles semantic similarity: ask "how was that cross-domain issue fixed last time," and it finds by meaning, not keyword. Each layer covers its part, avoiding the dead ends of a vector-only store (slow metadata queries) or a relational-only store (dumb semantic retrieval).

The worker layer is more than an interface. On startup it prints a local address; opening it shows a "My Work" page with live requests, processing progress, and hand-off items awaiting your review. Memory accumulates in the background; you see in the foreground what it accumulated. That transparency matters for newcomers; otherwise you never know for sure whether it actually remembered.

Retrieved historical observations carry numbers, and the agent can attach a number when citing a past conclusion; the design is called citation, so you can check which "last time" it means. The local viewer shows live requests, processing progress, and a human hand-off queue. For teams there is also a shared workspace, but personal requests and review notes stay local by default.

One detail for teams: in the shared workspace, every conclusion lists the member who contributed it, so attribution is clear. Personal requests and notes do not sync automatically; sharing is an explicit action, not a default.

Three other ways to store memory on the same track

Compressed summaries are not the only path for memory. Put the four projects on this chart side by side and the design differences are obvious.

Project Stores Agent call entry License
claude-mem Compressed session summaries Hooks, local HTTP endpoint, four MCP tools Apache-2.0
Hindsight Facts and observations, separate stores per user, agent, project REST, Python and other language SDKs, CLI, MCP MIT
MemPalace Verbatim conversation text CLI, MCP See repo
Mem0 Extracted memory entries, append-only SDK, hosted API See repo

There's also the licensing split. claude-mem and Hindsight chose Apache-2.0 or MIT, so enterprises can embed them without friction; the teaching-oriented LearnHarness chose AGPL-3.0, making commercial use a consideration. The memory layer is something that lives in the deepest part of your dev workflow; license friendliness can, to some degree, decide whether it gets inside a corporate network more than the feature list does.

claude-mem bets on compression: saves context but loses the original wording. MemPalace goes the opposite extreme, storing conversations verbatim and fishing with semantic search; wording is preserved but retrieval volume is larger, and it had only 357 stars on the Python daily chart that day, an order of magnitude smaller. Hindsight abstracts operations into three verbs: retain, recall, reflect. Its README says its LongMemEval score was reproduced by researchers at Virginia Tech and the Washington Post, while acknowledging that numbers from other vendors in the chart are self-reported. Mem0 appends without overwriting old memories; its benchmark notes include hosted-platform optimizations that the open-source SDK may not reproduce.

In this comparison there's an honest caution: three of the four cite LongMemEval in their READMEs, but most numbers are self-reported. Don't pick based only on that score; look at whether the storage model fits your workflow. Want original wording, choose the verbatim camp. Want token savings, choose compression. Want per-agent separation for many agents, choose Hindsight's subject-isolated design.

An easily overlooked point: the four projects share nearly the same business model: open-source repo free, hosted service paid. Star count measures attention, not installs, and certainly not retention. Treat stars as a clue, not a verdict, when choosing.

Three pitfalls to know before installing

First pitfall: installation method. npm install -g claude-mem only installs the SDK and libraries; the hooks do not register and the worker does not start. The correct entry is npx claude-mem install, or the plugin marketplace inside Claude Code. The failure is quiet: commands exist, but nothing records, and many people assume it's installed.

Second pitfall: the account. The installer guides you to log into claude-mem's hosted observer via email magic link, no card required, with a 30-day trial. During the trial, memory goes through the hosted channel; the official claim is that this consumption does not count against your Anthropic plan quota. When the trial ends, it automatically falls back to your Anthropic plan. To skip login, pass --provider to specify an OpenRouter or Gemini key, or set CLAUDE_MEM_ONLINE_OPTIN=false to skip the whole online flow; in non-interactive environments like CI, the login prompt simply does not appear by default.

Third pitfall: the privacy boundary. The memory system continuously records tool behavior in the background by default; sensitive content must be excluded explicitly. claude-mem uses <private> tags; segments wrapped in them do not enter the store. After installing, go through the documentation's fine-grained switches for context injection and decide which projects to remember and which not; that saves more trouble than cleaning up later.

Fourth: restart. After installing the plugin, you must restart the host for it to take effect, because hooks register at startup. Many people start a new session right after installing, see no memory, and think the install failed; it just wasn't restarted. The OpenCode documentation stresses this separately; versions above 1.3.4 support it, and OpenCode 2 does too.

Five commands to run once

Using Claude Code as an example, the full chain is these:

# Option one: plugin marketplace (recommended)
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem

# Option two: command-line installer
npx claude-mem install

# Skip online login, full control
npx claude-mem install --provider host

After install, restart Claude Code, and the previous session's project context appears automatically in the new session. To confirm memory is working, open the local viewer address printed at startup; session records, retrieval records, and the review queue are all on that page. For OpenCode, version >=1.3.4 is required; OpenCode 2 is also in the supported list, and it also needs a restart after install. Installing Grok Bot is another path; that host has no hooks, so claude-mem instead watches the chat log file.

There is a dumb but reliable way to verify memory works: deliberately ask, in a new session, about a detail from the previous round, like "where did we put that config last time," and see whether it returns a numbered citation. If it does, the whole capture-compress-retrieve chain is wired. If not, check the viewer to see whether the observation never landed in the store or the retrieval missed; the two problems are fixed entirely differently.

How long this memory fever can burn

Several signals are worth watching.

Zoom out a bit: the charts from these two weeks tell the same story. Most of the top ten are not new agents but parts for agents you already run: skill files, memory layers, teaching shells. CleanYourTV, a 40k-star project, essentially uses the coding agent as a generic installer. The thriving parts ecosystem means the agent itself has stabilized and people are stacking layers on top.

On the demand side, AI Memory rose 35% in eleven days, and a skill-set project like Superpowers still added 1,255 stars in a single day, with a total of 309,155; tools that add capabilities to agents are broadly on an upward track. On the measurement side, GitHub's robots.txt explicitly blocks scraping of Trending weekly and monthly charts, so third-party charts can only rely on real star counts from new repos, making cross-week comparisons increasingly hard. On the evaluation side, memory benchmarks are now mostly self-reported; if the practice of having outside institutions reproduce scores, as Hindsight did, becomes the norm, then selection will have hard evidence.

My judgment: the session gap is the most irritating stone in today's agent experience, and until models ship native long-term memory, bolt-on memory layers will remain a must-have. 100k stars doesn't mean claude-mem is the end; it only validates the track. Install one, run it for two weeks, and see whether your own fragment cost drops; that beats any chart.