Playbooks · Coding tasks
Run claude-mem on your own plan, redaction on
Written November 4, 2026
Claude-mem gives Claude Code a memory across sessions, and its default settings decide two things before you have done any work: whose model summarizes your sessions, and whether secret-shaped text is stored as written. Both defaults can be changed. Both must be changed before the first observed session, not after.
What claude-mem is, and what it adds
Claude-mem is a plugin for Claude Code that records what happens in a session — tool calls, decisions, and outcomes — and makes that record searchable in later sessions. Hooks capture tool usage as the session runs, a worker process summarizes what happened, and the summaries live in a local database under ~/.claude-mem, alongside the settings file. The general install is covered on the claude-mem skills page, which gives the install commands and the trust rating. This page adds what that page does not: the redaction defaults, the per-host provider choice, the recall test, and what leaves the machine.
Two decisions are made at install time, and the installer's defaults are not the same as the settings file's defaults. The installer, npx claude-mem install, asks you to sign in through a browser with an email magic link, provisions a memory key, and unlocks the claude-mem hosted observer on a 30-day free trial. Memory summarization then runs off your Anthropic plan, falling back to the hosted observer. Skipping sign-in is a deliberate choice: pass an explicit --provider flag, set CLAUDE_MEM_ONLINE_OPTIN=false, or run it without an interactive terminal. The configuration documentation lists the default provider in the settings file as claude, with codex, gemini, openrouter, and openai-compatible as alternatives, and the default summarization model as haiku. The practical consequence is simple: decide before the first session whether summarization runs on your own plan or through the hosted observer, and install with that choice explicit, rather than accepting whichever route the installer offers first.
Install per host. Claude-mem observes the Claude Code installation on the machine it is installed on, and its settings file lives at ~/.claude-mem/settings.json on that machine, created with defaults on first run. A second machine, a second user account, or a container with its own home directory is a separate installation with separate settings, and a choice made on one host does not carry to another. The same applies to redaction: it must be on, on each host, before that host's first observed session.
Redaction: on before the first session
Redaction is opt-in, and it is off by default. The configuration documentation lists CLAUDE_MEM_REDACT_ENABLED with a default of false: when enabled, recognized secret patterns are replaced with <redacted type='…' /> markers before storage, in tool input and output, prompts, summaries, and server-runtime event bodies. A second switch, CLAUDE_MEM_REDACT_GENERIC_ENABLED, is also off by default and covers lower-confidence patterns — passwords and generic secret-shaped values such as variables named *_SECRET and bearer tokens — separately from the vendor patterns the first switch covers. Turn both on. The first switch alone leaves the generic patterns stored as written; the second alone is not the documented vendor coverage. The settings that do this, in ~/.claude-mem/settings.json, are:
{
"CLAUDE_MEM_REDACT_ENABLED": "true",
"CLAUDE_MEM_REDACT_GENERIC_ENABLED": "true"
}
Timing is the whole point. Redaction replaces patterns before storage, so a secret observed in a session that ran before redaction was turned on is already stored as written, and turning redaction on afterwards does not rewrite it. The settings file is auto-created with defaults on first run, so the safe order is: install, open the settings file, set both switches, and only then start the first session you care about. A session started to "just try it" before the switches are set is a session whose observations are stored under the defaults.
Redaction is a pattern match, not a guarantee. It replaces recognized secret patterns; it does not understand that a particular string is sensitive because of what it unlocks, and a secret in an unusual format, split across lines, or pasted inside a larger blob may not match any pattern. Anything that must never be stored should be kept out of the session entirely, or tagged with <private> markers, which the README documents as excluding content from storage. Treat redaction as a safety net for the cases it recognizes, and the <private> tag as the control for the cases you already know about.
What leaves your machine
With the provider set to claude and sign-in skipped, summarization runs on your own Anthropic plan: session content goes to Anthropic's API for summarization, as it does for the session itself, and the summaries come back to the local database. With the hosted observer, session content goes to claude-mem's hosted service for the same purpose. Either way, summarization is not a purely local operation: something outside the machine reads the session to summarize it. The difference is which service reads it and under whose terms. The local database — the memories themselves — stays under ~/.claude-mem either way, and it stays there after the plugin is removed: uninstalling the plugin does not delete the folder, so memories remain on disk until you delete that folder yourself. If you stop using claude-mem, the folder is the thing to remove, not only the plugin registration.
The recall test, on your own project
Memory that cannot be recalled is storage, not memory. Test it on a real project, with a fact that only that project would produce, and judge it by two questions: does the decision surface in a new session, and does the secret-shaped test value stay redacted in what is stored.
- Install per host, with the provider explicit. Run
npx claude-mem install --provider claudeon the host, which skips sign-in and uses your own plan. Confirm the settings file exists at~/.claude-mem/settings.jsonbefore continuing. - Turn both redaction switches on. Set
CLAUDE_MEM_REDACT_ENABLEDandCLAUDE_MEM_REDACT_GENERIC_ENABLEDto"true"in the settings file, and read the file back to confirm both values are present. Do not start a session until both are set. - Do one distinctive piece of work, with a marker. In a session on a real project, make a decision that is specific to that project — a naming choice, a rejected approach and why, a dependency pinned for a stated reason — and state it plainly in the session. In the same session, include one invented secret-shaped value, such as a fake key string in a test variable, in a context where redaction should catch it. Use an invented value, never a real credential: the test is whether the pattern is replaced, and a real credential has no place in a test.
- Start a new session and ask for it. In a fresh session on the same project, ask what was decided and why, in your own words rather than the marker's exact wording. A pass is a summary of the decision that matches what was decided, retrieved without you restating it.
- Check what was stored. Open the stored observations for the test session — through the search and viewer surfaces claude-mem provides — and confirm two things: the decision is present, and the invented secret-shaped value appears only as a redaction marker, never as written. A pass on recall with a fail on redaction is a fail overall: the memory works and the protection does not.
- Repeat on the next host before trusting it. The settings file is per host. A pass on one machine says nothing about another, and a host installed in a hurry with defaults is a host storing unredacted observations until someone checks.
What can go wrong
- A trial session before the switches are set. The first session stores observations under the defaults, and defaults have redaction off. Anything secret-shaped in that session is stored as written, and later enabling redaction does not rewrite it.
- One switch on, the other off. Vendor patterns and generic patterns are separate switches. Enabling only the first leaves passwords and generic secret-shaped values stored as written; enabling only the second leaves the vendor patterns to the default, which is off.
- Assuming the provider default is the installer default. The settings file defaults to the
claudeprovider, but the installer without a flag leads to sign-in and the hosted observer trial. The two routes are not the same choice, and the choice should be made deliberately, per host. - Treating redaction as a guarantee. A pattern match misses what it does not recognize. Secrets in unusual formats, or sensitivity that comes from context rather than shape, pass through. Keep genuinely sensitive material out of sessions, or behind
<private>tags. - Uninstalling and assuming the memories are gone. The database lives under
~/.claude-memand survives plugin removal. Deleting the plugin registration without deleting the folder leaves the memories on disk.
Limits
- No recall outcome is claimed here. The test above is a procedure for the reader to run on their own plan and their own project, and no pass rate is stated.
- Redaction coverage is stated only as documented: recognized secret patterns, plus the generic patterns the second switch covers. No list of covered patterns is claimed, and no pattern is promised to match every secret format.
- Install requirements are Node.js 20 or later and a current Claude Code with plugin support. The
npm install -g claude-memform installs the SDK and library only; it does not register the hooks or the worker, and it is not the install for this page.
Related playbooks
- Run Claude Code Projects without burning quota
- Plan allowances: what each agent plan lets you do
- Run LongCat-2.5 in Claude Code without the 200K cap
- Run three independent lines of research at the same time in Claude Code, then combine the short summaries
Sources
Back to: Coding playbooks hub · Also: Make your coding agent remember past work across sessions — install Claude-mem · Agent Skills has a neutral home — and still no security story