Claude-Mem: What It Remembers and How to Use It

See what claude-mem saves between Claude Code sessions, how to install and disable it, and which records can leave your machine.

Published

Claude-Mem: What It Remembers and How to Use It

On your second Claude Code session in the same project, claude-mem can give Claude an index of the work you did in the first. That helps when you remember fixing a login bug but can’t remember which file held the fix. For a standing rule like “run the API tests before committing,” a project instruction is simpler.

Alex Newman (@thedotmack) created and maintains claude-mem as an independent open-source project. Anthropic makes Claude Code and its built-in memory features. Installing claude-mem gives a separate piece of software access to activity in your coding sessions. The repository, license and setup instructions below were checked on December 4, 2026.

The claude-mem project repository, with its source files and README
The claude-mem repository maintained by thedotmack

What claude-mem remembers between sessions

Claude-mem keeps a searchable record of work Claude did with its tools. When Claude reads a file, edits code or runs a shell command, a hook passes information about that action to a local background service. An observer, a second model working as a note-taker, condenses the activity into an observation. A bug-fix observation can name the files involved, describe what changed and record what Claude learned. A session summary can also retain what you asked for, what Claude investigated and what remains to do. Project guide to captured activity

The worker stores sessions, observations and summaries in a SQLite database at ~/.claude-mem/claude-mem.db. Think of the opening context as a lab notebook’s index. At the start of the next session in that project, Claude receives a compact list of recent work. It can open the notebook at the entry it needs. You can inspect the records yourself in the worker’s local viewer at /viewer.

How to use claude-mem to recover a bug fix

The README uses an authentication bug as its example. Suppose login is failing again after a branch change. Ask Claude to find the previous authentication fix and identify the files it touched. The search tool returns short entries with IDs. Claude can look at the surrounding timeline to distinguish the first attempted fix from the one that followed, then fetch the full observation for the relevant ID.

A catalog card locates nearby samples in sequence before a single full core is lifted for inspection
Search finds a candidate, the timeline places it in sequence, and the full record supplies the detail.

Check the named files on your current branch before using the old fix. A note that says a cookie setting changed is a lead. The current setting and a passing login test tell you whether the fix still applies.

Cost. The plugin code is royalty-free under the Apache 2.0 license. The observer uses the plan or provider you choose, and recall adds input tokens: the README estimates roughly 50 to 100 tokens per search hit and 500 to 1,000 per full record, plus the timeline when requested. Your total also depends on how often the observer runs and how many records Claude opens.

How to install claude-mem and turn it off

For a developer already using Claude Code, the marketplace route gives you a straightforward way to try the plugin and disable it later. Start with a current Claude Code installation that supports plugins and a Node.js release supported by the project. Its installation guide also covers the standalone installer and the choice of memory provider. Choosing local memory with your existing Anthropic plan requires no separate claude-mem login.

  1. Add the project marketplace inside Claude Code

    Enter these lines one at a time at the Claude Code prompt in your terminal. The first adds Newman’s plugin catalog. The second installs the plugin from it.

    Text
    /plugin marketplace add thedotmack/claude-mem
    /plugin install claude-mem

    Restart Claude Code. Installing the npm library alone skips the hooks that record tool activity.

  2. Give it one piece of work to remember

    Use a project where keeping session notes is appropriate. Have Claude investigate a recognizable issue. Open a fresh session in that same project and ask which files the investigation touched. The first session supplies the history for the second. If the answer is vague, compare it with the observations in the local viewer before relying on it.

  3. Disable the marketplace plugin from your shell

    Exit Claude Code and enter the command below at your normal terminal prompt. The command appears in the project’s issue tracker.

    Bash
    claude plugin disable claude-mem

    On the next launch, check that claude-mem appears among the disabled plugins in the Installed tab. You can enable it there again. This changes which plugin Claude Code loads. If your aim is to erase earlier records or disconnect another coding agent, treat that as a separate task. Claude Code’s plugin controls

What stays on disk and what leaves your machine?

Local storage tells you where the notes live. To decide whether to use claude-mem on a client repository, ask who processes the material that goes into those notes, and whether anyone receives a copy.

  • Model processing. The selected observer processes tool activity to write summaries. If you select your Anthropic plan, Anthropic processes the activity and the observer draws on that plan’s allowance. Selecting a hosted observer or another API provider changes who processes it. Leaving sync off still allows these model requests.
  • Cloud Sync. If you opt in, eligible observation text, summaries and recorded prompts go to your cmem.ai account. Converted tool screenshots are kept by default under ~/.claude-mem/media-v1/ and can upload with sync. Keep images controls future image capture. Sending images to the observer requires a separate image-inference setting. Cloud Sync data types
  • Usage reporting. Anonymous analytics are on by default. The project lists usage counters and redacted error reports. To opt out, run npx claude-mem telemetry disable in your shell. This switch controls analytics; your observer and sync choices have their own settings. Telemetry documentation
An archive cross-section shows the model-processing route and a separate shutter for optional cloud sync
A hosted model can process a tool result even when the archive stays on your computer.

For a one-off detail you want excluded from the plugin’s records, the project supports wrapping text in <private> and </private>. Claude still sees that text in the current conversation. If a client prohibits sending tool output to your chosen observer, leave the plugin disabled for that work. Private tag behavior

Which Claude memory should you use?

Choose by the question you need answered. “How do we run the tests?” belongs in a place the team can edit. “Which tests did we try yesterday?” calls for a history of actions. Claude Code’s memory documentation and the Claude app’s memory guide describe the two built-in settings developers often conflate.

MemoryWho writes it and where it appliesWhat belongs there
Project CLAUDE.mdYou or your team maintain instructions in a file you can commit to the repo. Claude Code reads it as project context.“Use the API test suite before changing auth.”
Claude Code auto memoryClaude writes editable Markdown notes for the project on this machine and loads its memory index in later sessions.A correction you want Claude to retain, such as a test that requires a local service.
claude-memThe plugin’s observer records tool activity in a searchable database and brings project history into later sessions.Which test failed during the last auth investigation, and what Claude tried next.
Claude app memoryClaude summarizes earlier chats for use in later conversations. Projects have their own memory context.A preference you want to carry into your next planning conversation.

If your problem occurs halfway through one long session, read about what auto-compaction keeps in the current window. For continuity between the app and your coding workflow, start with what Claude remembers across chats, projects and Code.

When to skip the plugin

Skip it when the missing information is a rule everyone needs. If a teammate on a fresh checkout should know how to test the login flow, put the procedure in the repository. A useful observation on your laptop can point out a gap in the docs. Once the procedure is settled, write it where the next developer can review it.

If the problem is how Claude approaches work, pick a tool that changes its instructions. Ponytail’s approach to simpler code addresses overbuilding. A Claude skill for a recurring task can supply a procedure. Saving more history solves neither problem on its own.

Try claude-mem when investigations regularly span sessions. Pick one recurring issue on a repository you can use with the chosen provider. Ask for the earlier decision, the file involved and the next unfinished step. If a short project note already gives you all three, there is little reason to pay the ongoing cost of an observer.

Does Claude Mem really work?

The project documents automatic capture and second-session retrieval. For a useful check on your own setup, choose a fix with a known file change, start a fresh session and ask Claude to locate the observation. Compare its answer with the file and the saved record. A plausible answer alone tells you little about recall.

What does memory do for AI?

In claude-mem’s case, memory supplies earlier project notes as input when Claude answers. The database can change after each session without any change to the underlying model.

Get the next developer guide by email.

Published
Category
Build
Related Articles
LM Studio Bionic: What It Is and How to Start

LM Studio Bionic: What It Is and How to Start

How Bionic works alongside LM Studio, where its models run and how to start a coding or document project on your computer.Dec 4, 2026Build
OpenRouter Free Models: Which to Call and What the Limits Are

OpenRouter Free Models: Which to Call and What the Limits Are

Find a free OpenRouter model for your project, make an API call, check your remaining quota, and see which providers may retain or train on prompts.Dec 4, 2026Build
Vapi AI: What It Is, What It Costs and How to Start

Vapi AI: What It Is, What It Costs and How to Start

Learn how Vapi answers and places calls, connects to a calendar or n8n, and what it takes to set up a first phone assistant.Dec 4, 2026Build
Amazon Bedrock: What It Is, What It Costs, and How to Start

Amazon Bedrock: What It Is, What It Costs, and How to Start

See which models Amazon Bedrock offers, what AWS bills for, and how to try a first request. Decide when to use Bedrock or the model maker’s own API.Dec 4, 2026Build
Claude Code MCP

Claude Code MCP

Connect a local or hosted MCP server to Claude Code, check sign-in, and choose between a shared .mcp.json and a claude.ai connector.Dec 3, 2026Build
Vercel Sandbox Desktop

Vercel Sandbox Desktop

Start a cloud desktop, watch an agent drive Chrome, or open Blender. See the exact commands, SDK example, and what a viewer link lets a teammate do.Dec 3, 2026Build
Claude Code REVIEW.md

Claude Code REVIEW.md

Where Claude Code reads REVIEW.md, what to put in it, and how to check your rules with a sample change. Includes a full web team example.Dec 3, 2026Build
Claude Code Auto Compact

Claude Code Auto Compact

Check why Claude Code compacted near 400K, what survived the summary, and when to use /autocompact 1M for a long codebase review.Dec 3, 2026Build
Newsletter

One letter, every Sunday.Working systems, not hot takes.

Weekly. No spam. Unsubscribe anytime.