Claude-Mem: Persistent Memory for Coding Agents at 105k Stars
By Indie Kings | October 30, 2026
Updated October 30, 2026: thedotmack/claude-mem, a memory layer that captures coding agent sessions and injects compressed context into later ones, reports 105,330 stars, 9,286 forks and 300 contributors on GitHub. The repository is Apache-2.0 licensed, was created on August 31, 2025, lists version 15.7.0 in its README badge, and pushed a security fix on October 30, 2026.
Image: a Memex exhibit at the Deutsches Technikmuseum, the 1945 idea of a personal memory extension, via Wikimedia Commons.
Memory as a hook, not a habit
Every coding agent has the same failure at the end of a session. The context window empties, the task is done, and the next session starts from nothing except whatever the user remembers to paste back in. Claude-Mem attacks that gap with the machinery the host already provides: lifecycle hooks. It registers six of them, SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop and SessionEnd, and each one calls a single command, claude-mem hook claude-code followed by the event name.
The architecture matters because it explains the product's limits. The hook is not a plugin that asks the model to remember things. It is a shell free command run by a small launcher the installer places on PATH, and it reports to a local worker service. That worker is a local HTTP API with a web viewer, managed by Bun, and it does the storage and retrieval work outside the model's context. The model only sees what the worker chooses to inject, which is the entire point: memory becomes infrastructure rather than a prompt instruction.
Installation is one command. npx claude-mem install sets up hooks, dependencies and the worker, then asks the user to sign in through a browser magic link. There is a dedicated path for OpenCode, npx claude-mem install --ide opencode, which requires OpenCode 1.3.4 or later including OpenCode 2. Other documented targets include Claude Code through its plugin marketplace, Grok Bot, T3 Code, Antigravity, OMP, Pi, DeepSeek Harness and OpenClaw gateways. That breadth is unusual for a memory tool, and it reflects a bet that memory should belong to the user rather than to one vendor's agent.
The README is explicit about one trap. Installing the npm package globally with npm install -g claude-mem gives you the SDK and library only. It does not register hooks or start the worker, so the tool will appear installed and do nothing. The supported path is the installer or the plugin marketplace commands, which is the kind of detail that saves an hour of confusion.
SQLite, Chroma and a three step search
Storage is split between two systems with different jobs. SQLite holds sessions, observations and summaries, and its FTS5 extension provides keyword search. A Chroma vector database provides semantic search, and the two are combined into a hybrid retrieval layer. The observation is the core record: a compressed note about something that happened, with a type such as decision, bugfix or security alert, plus an ID that can be cited later.
Retrieval is deliberately staged to protect the context window. The README describes a three step workflow exposed through MCP tools. First, search returns a compact index of results with IDs, at roughly 50 to 100 tokens per result. Second, timeline returns chronological context around an observation or a query. Third, get_observations fetches full detail only for the IDs that survived filtering, at roughly 500 to 1,000 tokens per result. The project claims about 10x token savings from filtering before fetching, and the arithmetic is easy to believe even if the exact multiplier depends on the query.
That design is a direct response to the way naive memory systems fail. Dumping everything relevant into the prompt burns the budget and dilutes attention. Returning nothing forces the agent to rediscover the project. A tiered index lets the agent decide what it needs, which is how a human uses a filing cabinet: scan the labels, pull two folders, ignore the rest.
There is also a viewer. The worker exposes a web UI on a local port printed at startup, with memory and sessions at /viewer and a My Work area for live requests, progress, human handoffs and a review queue. TeamBrain is an optional shared workspace beside it, with member attribution and linked findings, and each person chooses what to share. The privacy control is a tag: wrapping content in private tags excludes it from storage. Screenshots are opt in and off by default, stored locally under a media directory, uploaded only when Cloud Sync is on and sent to the observer model only when image inference is separately enabled.
None of this is free of moving parts. Node 20 or newer is required, Bun and uv are installed if missing, and the worker has to be running for hooks to record anything. A local HTTP service, a vector database and a browser viewer are a lot of surface for a developer tool, and the repository is correspondingly large at roughly 721 megabytes. The payoff is that the system works across harnesses, because the storage layer does not care which agent produced the observation.
The hosted observer and the opt-out
The part of the README that deserves the closest reading is the sign-in flow. After installation, the tool asks you to sign in to claude-mem in a browser with an email magic link, no card required. Signing in provisions a memory key and unlocks the claude-mem observer with a 30 day free trial. The README says memory then runs off plan, which it claims gives up to 100 percent more usage from your existing plan, and that when the trial ends memory falls back to your Anthropic plan unless you subscribe.
That is a hosted service attached to a local tool, and the project is candid about the choices. You can skip sign-in entirely by passing an explicit provider flag, setting CLAUDE_MEM_ONLINE_OPTIN to false, or running in a CI or non interactive shell. You can also choose your own OpenRouter or Gemini key, or use your Anthropic plan directly. The default, however, points at the hosted observer, which means the first run experience is account creation and a trial rather than a purely local install.
The compression step explains why a model is involved at all. Raw session transcripts are long and repetitive, and turning them into useful observations requires summarization. The README's description says the tool captures everything the agent does, compresses it with AI and injects relevant context into future sessions. Whether that summarization happens on the hosted observer or through your own key is the main privacy and cost decision, and it is the one setting a new user should change deliberately rather than accept by default.
The numbers around the project are extraordinary and worth stating carefully. The API reports 105,330 stars against 9,286 forks, with 300 contributors and 125 open issues and pull requests. A star count above one hundred thousand places a repository among the most starred software projects on GitHub, and this one is barely fourteen months old. That kind of growth is usually a signal of a real pain point rather than a mature product, and the 125 open items suggest the maintenance load is real. The README badge says version 15.7.0 while the newest release on GitHub is v15.6.0, a small mismatch that is normal in fast moving projects but worth knowing if you pin versions.
Project card
| Item | Detail |
|---|---|
| Repository | thedotmack/claude-mem on GitHub |
| Purpose | Persistent memory for coding agents, captured through lifecycle hooks |
| Storage | SQLite with FTS5 for sessions and observations, Chroma for vectors |
| Retrieval | Three step MCP workflow: search, timeline, get_observations |
| Hooks | SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, SessionEnd |
| Supported hosts | Claude Code, OpenCode, Grok Bot, T3 Code, Antigravity, OMP, Pi, DSH, OpenClaw |
| Runtime | Node 20 or newer, Bun worker, uv for vector search |
| Privacy | Private tags, opt in screenshots, hosted observer can be skipped |
| Version | 15.7.0 in the README badge, v15.6.0 as the newest release |
| License | Apache-2.0 |
| Scale | 105,330 stars, 9,286 forks, 300 contributors, 125 open items |
FAQ
What does claude-mem actually do?
It records what a coding agent does during a session, compresses those records into observations, and injects relevant ones into later sessions through hooks and a local worker.
Which agents does it support?
Claude Code, OpenCode 1.3.4 and later, Grok Bot, T3 Code, Antigravity, OMP, Pi, DeepSeek Harness and OpenClaw, with Claude Desktop search as a separate skill.
Where is the data stored?
Locally in SQLite and Chroma, under a data directory configured in the settings file, with a local viewer served by the worker.
Does it send my code to a server?
It can. The hosted observer handles compression by default after sign-in, but you can skip sign-in or choose your own OpenRouter, Gemini or Anthropic credentials.
What is the free trial?
Signing in unlocks the claude-mem observer for 30 days, after which memory falls back to your Anthropic plan unless you subscribe.
Why is the repository so large?
It bundles a worker, a viewer, vector search tooling and integrations for many hosts. The API reports about 721 megabytes, so expect a substantial install.
Bottom Line
Claude-Mem is the most complete attempt yet to turn agent memory into infrastructure rather than a prompt trick. The hook design, the SQLite and Chroma split, and the tiered search workflow are the right primitives, and support for OpenCode and other harnesses makes it more than a Claude Code accessory. The hosted observer is the part to watch: a 30 day trial that falls back to your own plan is a fair offer, but it makes the default path account based, and the opt-out flags deserve to be used deliberately. The star count is a phenomenon, not a quality guarantee, and 125 open items is a lot of surface. Install it with the supported command, read the settings file, and decide where compression happens before you trust it with a month of work.
Sources
- GitHub thedotmack/claude-mem README, install paths, hooks, storage, MCP tools, privacy and hosted observer terms, accessed October 30, 2026
- GitHub API metadata for thedotmack/claude-mem, stars, forks, contributors, issues, size and latest push, accessed October 30, 2026
- GitHub releases for thedotmack/claude-mem, newest release v15.6.0 published October 29, 2026
Related: ub-mode: Uncle Bob's Skill for Disciplined AI Coding | REA: The MCP Server That Reverse Engineers Anything