claude‑mem adds persistent memory to Claude Code
A free tool called 'claude‑mem' is trending for adding persistent memory to Claude Code sessions, automatically saving context to reduce repeated explanations and token waste; it’s installable via npx. The social thread notes the repo has about 47k GitHub stars and aims to make session state persist across interactions (x.com).
Claude Code starts each chat with a fresh context window, and claude-mem is gaining users by trying to carry that context forward automatically. (code.claude.com, github.com) Anthropic’s own docs say Claude Code already has two memory systems: `CLAUDE.md` files that users write and “auto memory” notes that Claude writes itself. Both are loaded at the start of every session, but each session still begins with a fresh context window. (code.claude.com) claude-mem is an independent plugin by GitHub user thedotmack that says it captures tool usage during coding sessions, compresses it with artificial intelligence, and injects relevant context into later sessions. Its GitHub repository showed about 47,400 stars and 3,700 forks when checked on April 14, 2026. (github.com) The installation pitch is simple: `npx claude-mem install`. The project’s docs say that command detects supported editors or coding agents, registers the plugin with Claude Code, installs dependencies including Bun and uv, and starts a worker service. (docs.claude-mem.ai) The project says it stores its data locally in `~/.claude-mem/`, including a SQLite database, logs, settings, and worker state files. The same docs say it works on Windows, macOS, and Linux, and that SQLite 3 is bundled. (docs.claude-mem.ai) That setup targets a practical problem in coding agents: users often repeat build commands, architecture notes, debugging history, and prior decisions after a restart or reconnect. Anthropic’s guidance tells users to write down repeated corrections in `CLAUDE.md`; claude-mem tries to automate more of that note-taking. (code.claude.com, github.com) Anthropic describes Claude Code as a system that reads codebases, edits files, runs tests, and works across command-line tools. In that kind of workflow, losing session history can mean reloading a large amount of project-specific context before any new work starts. (anthropic.com) claude-mem’s README says recent versions shifted to “skill-based search” and a “progressive disclosure” model that shows token cost, while its installation docs say version 5.4.0 and later save about 2,250 tokens per session by replacing Model Context Protocol tools with that search system. (github.com, docs.claude-mem.ai) The project also includes privacy controls, according to its README, including `<private>` tags that can exclude sensitive content from storage. That matters because the tool is designed to capture what Claude does during sessions, not just what a user types into chat. (github.com) The fine print is that npm can be misleading here. The project’s docs say `npm install -g claude-mem` installs only the software development kit library, while the working plugin setup requires `npx claude-mem install` or Claude Code’s plugin marketplace commands. (docs.claude-mem.ai, github.com) So the story is not that Claude Code suddenly got memory on April 14, 2026. It is that a third-party plugin is attracting attention by promising a more automatic, more durable version of memory for people who do not want to keep re-explaining the same project to their coding agent. (code.claude.com, github.com)