📑 Table of contents

claude-mem: persistent memory across sessions explodes to 108,000 stars on GitHub

Outils IA 🟢 Beginner ⏱️ 12 min read 📅 2026-11-01

claude-mem: persistent memory across sessions explodes to 108,000 stars on GitHub

🔎 The tool that killed code agent amnesia

Everyone who codes with an agent knows the ritual. You reopen a session, and the agent knows nothing: not yesterday's decisions, not the bugs fixed the day before, not the project's conventions. You spend ten minutes piecing the context back together before the first line of code. claude-mem just killed that ritual, and GitHub just made it official.

On October 31, 2026, thedotmack/claude-mem reigns at the top of GitHub Trending with more than 108,000 stars. The project gained 13,000 stars in 30 days and 1,500 on the day itself, with 9,500 forks and 315 contributors. Apache-2.0 license, v15.7.0 released on October 30. This is no longer a promising project: it's a standard.

Why now? Because agent-based work has become the norm — and context loss between sessions has become the biggest productivity drain in AI-assisted development. Persistent memory is no longer optional. It's the missing building block, and claude-mem just locked it in.


The Essentials

  • 108,000+ stars on GitHub as of October 31, 2026: +13,000 in 30 days, +1,500 on the day itself, #1 on GitHub Trending. 9,500 forks, 315 contributors.
  • The problem solved: context loss between agent sessions. claude-mem automatically captures tool observations, compresses them with AI, and re-injects the relevant context into subsequent sessions.
  • The architecture: 5 lifecycle hooks (SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd), SQLite storage, hybrid search via the Chroma vector database, local Bun worker on port 37777.
  • Compatibility: Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode. A de facto standard, not just a Claude Code plugin.
  • What's new: My Work (real-time tracking + human handoffs), TeamBrain (shared team memory), per-observation privacy tags.
  • The price: free and 100% local, Apache-2.0 license. Latest version: v15.7.0 (October 30, 2026).

If you're building with agents, here's the memory stack that matters as of November 2026.

Tool Main use Price (November 2026) Best for
claude-mem Multi-agent persistent memory Free, open source (Apache-2.0) Devs on Claude Code, Codex, OpenCode
mem0 API-based memory layer for custom agents Freemium (check mem0.ai) Teams building their own agentic products
Chroma Embedded vector database Free, open source Hybrid semantic search locally
SQLite Structured storage of history Free (public domain) Queryable session history

My take: for development session memory, claude-mem has no real competitor to date. For application-level memory of your own agents, mem0 remains relevant — but that's a different problem, more on that later.


What is claude-mem, exactly?

claude-mem is an open source persistent memory engine that records everything your agent does during a session, compresses those observations with AI, then automatically feeds them back into subsequent sessions. Nothing to copy, nothing to paste, nothing to re-explain.

It's neither a wrapper nor a SaaS. Under the hood: a local HTTP worker with a web interface, a SQLite database, a Chroma vector database for hybrid search, a mem-search skill, and four MCP tools (search, timeline, get_observations) organized into a three-layer workflow to save tokens. All installable with a single command on the OpenClaw gateways.

The growth trajectory is unusual. As of June 21, 2026, the project had 83,900 stars and 288 releases according to Augment Code. In the October 2026 GitHub Trending rankings, it was already leading with 96,221 stars according to CoddyKit. By October 31: 108,000. Detailed growth data for the repository is tracked by GitGenius.

A word on context: claude-mem is not the only open source project taking off thanks to agents. DeepTutor passed 52,000 stars with a completely different promise. But none of them occupies the persistent memory niche with this level of adoption density.

The real problem: every session starts from scratch

Without persistent memory, a coding agent forgets everything at the end of each session — and you pay for that context re-establishment in time, tokens, and errors. That's the core argument of claude-mem, and it's hard to dispute.

Whether your agent runs on Claude Opus 4.6, GPT-5.5, or Gemini 3.1 Pro (our comparison of the best LLMs for coding compares them in detail), the problem is the same: the session closes, the memory evaporates. The model itself never knew anything about your project.

Concretely, what do you lose when a session closes? Architecture decisions and their rationale. Naming conventions discovered through sheer iteration. Bugs already fixed — and therefore already re-fixed three times. Files touched, approaches tested and abandoned. On a multi-week project, this amnesia costs dozens of minutes per day, multiplied by every dev on the team.

The topic isn't just practical. Anthropic is exploring inter-session learning in its research with its agents that "dream" between sessions. claude-mem is the pragmatic version of that intuition: no need to wait for the research to pan out for your agents to remember.

My take after several weeks of use: the most underrated gain isn't the time saved, it's the continuity. An agent that remembers doesn't regress. It doesn't re-propose the solution you rejected yesterday.


How it works: five hooks, one compression, two databases

claude-mem hooks into your agent's lifecycle via five hooks, captures tool observations continuously, compresses them with AI, then silently injects relevant context into the next session. No command to run, no ritual to memorize.

The five lifecycle hooks

The official documentation describes five anchor points: SessionStart, UserPromptSubmit, PostToolUse, Stop and SessionEnd. PostToolUse is the sensor: every tool call produces an observation captured automatically. SessionStart is the injection: relevant context surfaces back into the session via additionalContext, silently, since Claude Code 2.1.0.

UserPromptSubmit acts as an on-the-fly filter, Stop and SessionEnd as consolidation points. The whole thing runs on a local Bun worker, on port 37777, with a web interface to inspect what has been retained.

This is where claude-mem stands apart from simple session "loggers". Raw observations are compressed into semantic summaries, stored in SQLite for structured history and indexed in Chroma for vector search. Search is hybrid: semantic and literal.

The three-layer workflow of the four MCP tools exists for a reason: saving tokens. Raw logs are never re-injected, only the relevant context, at the necessary level of granularity. That's the difference between memory that costs and memory that pays off.

Installation takes a single command:

npx claude-mem@latest install

The hooks register in your configuration, and memory starts building from the very first session.


Compatibility: the de facto standard for coding agents

claude-mem is not just another Claude Code plugin: it has become the memory layer that all the major agents are climbing on board with. That's exactly what explains the 108,000 stars — and what all the alternatives are missing.

Agent Compatibility status
Claude Code Native — hooks + additionalContext injection (2.1.0+)
OpenClaw Plugin installable with a single command on gateways
Codex Supported — Windows sandbox denials explained since v15.7.0
Gemini Supported
Copilot Supported
Hermes Supported — with its own skills memory, see below
OpenCode Supported

On the OpenCode side, the convergence is striking: 8 million devs and 172,000 stars for the open source agent, 108,000 for its memory layer. Two communities that reinforce each other.

v15.7.0, released on October 30, 2026, illustrates how serious the project is: hook stdin properly framed without waiting for EPIPE, closed-session EPIPE no longer logged as a fatal error, Codex sandbox denials on Windows now explained to the user, and the Chroma fallback filtered to SQLite row ids to avoid ghost results. These are engineering details — but they're exactly what separates a standard from a prototype.

The GitHub long-term-memory topic counts 1,287 public repos. claude-mem is presented there as the reference in the field: capture everything the agent does, compress it with AI, reinject it into future sessions. When a topic with 1,287 repos converges on a single project, we're no longer talking about a trend — we're talking about the standard.


My Work and TeamBrain: memory that outgrows the solo dev

Recent versions are transforming claude-mem from a personal context cache into team memory infrastructure. It's the project's least-discussed and most strategic pivot.

My Work tracks in real time what the agent is working on, and prepares handoffs back to the human: when you take over, you know precisely where the agent left off — and vice versa when it picks up where you stopped. Version 15.7.0 sharpens the positioning: My Work stays on the agent's side, with a Feedback button to course-correct in one click.

TeamBrain is the shared team memory: conventions, decisions, learnings, pooled across devs. Frankly, it's the feature that could drive explosive enterprise adoption — a memory that survives team turnover simply doesn't exist anywhere else at this level of integration.

Confidentiality is handled seriously, via tags applied to observations: you decide what gets remembered, shared, or excluded. In a context where companies worry about what their agents are absorbing, this granular control is a selling point, not a detail.

The parallel with Anthropic is instructive: with Claude Tag, Claude's maker gave its assistant a persistent memory in Slack. When the market leader adds persistent memory, the trend gets validated from the top. But Claude Tag remains confined to the Slack ecosystem; claude-mem stays local, multi-agent, and under your control. Two answers to the same need — one proprietary, one community-driven.


claude-mem vs the alternatives: why it wins

claude-mem wins because it's the only one that treats memory as cross-cutting infrastructure — local, agent-agnostic, and free — while the alternatives remain specialized building blocks or walled gardens.

Solution Approach Limitation vs claude-mem
claude-mem Lifecycle hooks, AI compression, SQLite + Chroma, 100% local —
mem0 Memory API for custom agents Built for your products, not your dev sessions; SaaS dependency
ai-memory Context transfer between agents, open source Narrower scope, far lower adoption
Hermes skills memory Memory built into the agent Locked to Hermes, not cross-cutting
CLAUDE.md and context files Manual No automatic capture, permanently out of date

mem0 is an excellent product — for a different problem. It gives memory to the agentic applications you build. claude-mem gives memory to the sessions you work in. The two can coexist, but only one of them applies across all your coding agents.

Hermes deserves a special mention: it ships with its own skills memory, which is elegant within its ecosystem. But a captive memory is not a standard. claude-mem made the opposite choice — to be everyone's memory, including Hermes's.


❌ Common Mistakes

Mistake 1: Believing claude-mem replaces documentation

claude-mem remembers the workflow — decisions, observations, corrections. It replaces neither your CLAUDE.md nor your project rules. The solution: keep documentation for permanent rules, and let claude-mem handle the living history. The two layers don't serve the same role.

Mistake 2: Memorizing without configuring privacy

By default, everything the agent does is observed. If your sessions involve API keys or customer data, configure the privacy tags from day one. And never expose the web interface on port 37777 beyond your machine — it's a local tool, treat it as such.

Mistake 3: Staying on an old version

288 releases as early as June 2026, v15.7.0 on October 30: the pace is fast and the fixes are substantial (EPIPE, stdin, Chroma fallback). A project that fixes that much ships bugs just as often. Update regularly, or accept keeping bugs that others have already fixed.

Mistake 4: Confusing session memory with codebase memory

Installing claude-mem doesn't remove the need to index the codebase, and vice versa. One recalls session history, the other knowledge of the code. Confusing the two means ending up with an agent that remembers everything except your code — or the other way around.


❓ Frequently Asked Questions

Is claude-mem really free?

Yes. Apache-2.0 license, local worker, embedded SQLite and Chroma databases, no paid plan to date (November 2026). The only indirect cost is the token consumption of compression and re-injection — reduced by the three-layer workflow, and largely offset by the context re-explanation tokens it saves you.

Does my session data leave my machine?

No. The worker runs locally (port 37777), storage is SQLite, the vector index is Chroma, the web interface is local. Privacy tags let you exclude sensitive observations from memory. The trade-off: no native cloud sync — that's a deliberate choice of the project.

Which agents does claude-mem work with?

Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, and OpenCode. Silent injection via additionalContext requires Claude Code 2.1.0 or higher; other agents go through hooks and MCP tools. On OpenClaw gateways, installation takes a single command.

How many tokens does re-injection consume?

Less than what it replaces. Observations are compressed into semantic summaries, and the three-layer workflow of MCP tools injects only the relevant context, at the necessary granularity. A manual session recap typically costs more tokens — and it's less faithful.

What's the difference with Anthropic's native memory (Claude Tag)?

Claude Tag gives Claude persistent memory in Slack — one product, one ecosystem. claude-mem gives your coding agents persistent memory — local, multi-agent, open source. Both address the same need from opposite directions, and can coexist without stepping on each other's toes.


✅ Conclusion

With 108,000 stars, 315 contributors, and compatibility that covers all the major agents, claude-mem has transformed persistent memory from a research problem into a standard installable with a single command — the question is no longer whether you should adopt it, but why you're still going without it. Install it, star the repository, and to choose the agent that will use it, our comparison of the best AI tools for code is the right starting point.