Skip to content
Back to articles
devtools3 min

claude-mem: the nearly 100k-star repo that gives coding agents memory across sessions

KGA IT
2026-10-123 min
GitHubOpen SourceAgentsClaude CodeMemory
Capa: claude-mem, memória persistente para agentes de código

What it is

claude-mem (thedotmack/claude-mem) fixes a common annoyance with coding agents: every session starts from scratch. It automatically captures what the agent does (tool use, decisions, fixes), compresses it with AI into summaries and injects relevant context into future sessions.

Built for Claude Code, it now works with OpenCode, Codex, Gemini, OpenClaw, Copilot and other harnesses. Numbers checked via the GitHub API on October 12, 2026: ~99,600 stars, ~8,700 forks, Apache 2.0 license, created August 2025. On October 11 it gained over 500 stars in a day on GitHub Trending.

How it works

  • Lifecycle hooks (session start, prompt submit, post tool use, end) record observations.
  • A local worker (HTTP, managed by Bun) with a web UI shows the memory stream in real time.
  • Storage in SQLite with full-text search (FTS5) plus Chroma for hybrid vector search.
  • Three-layer MCP search: search returns a compact index, timeline gives chronological context, get_observations fetches details only for chosen IDs. The project claims about 10x token savings.
  • Privacy tags let you exclude sensitive content from storage.

What to check before installing

  • Account and cloud: the default installer asks for email sign-in and enables the hosted observer (CMEM Pro) with a 30-day trial, and there's cloud sync to cmem.ai. To stay local, pass an explicit --provider or set CLAUDE_MEM_ONLINE_OPTIN=false.
  • Sensitive data: anything the agent sees can become memory: code, client names, sometimes secrets in logs. Decide what may be stored and where.
  • Poisoned memory: if malicious content (prompt injection) gets into memory, it can come back in future sessions, the same risk flagged by research like Context Language Models.
  • Install: use npx claude-mem install or the plugin marketplace; npm install -g installs only the library.

Why it matters

Persistent memory is the new agent frontier, whether inside the model (Metis, CLMs) or in an external layer like this. claude-mem is the practical, already-popular version: it works today with tools teams use.

For dev teams

  1. Test on a non-sensitive repo first, in local mode.
  2. Set a memory policy: what to keep, for how long, who can access.
  3. Review stored memory periodically (the web UI helps).
  4. Measure the gain: do fewer tokens and fewer re-explanations per task justify it?

Sources


Want to adopt coding agents with memory safely in your team? KGA IT offers a free consultation: kga-it.com.

Let's solve your technical challenges together.

KGA IT Solutions delivers AI, cloud, and DevOps expertise to address your specific challenges.

Contact Us