PluginPartly tested (needs an account)

Remember past sessions

claude-mem

A plugin that records what your agent did in past sessions and brings the useful parts back later. The installer also offers an online memory service.

Works with
Claude Code, Codex CLI
Good for
Everyone, Daily work and research

What it does

claude-mem gives your assistant a memory that lasts between sessions. While you work, it notes what the assistant did: which files it changed, which bugs it fixed and which decisions you made. At the end of a session it writes a short summary. When you open a new session in the same project, it adds the most useful notes to the start of the conversation.

It works through hooks. A hook is a small command that Claude Code runs at a fixed moment, such as session start or after each tool. Since version 13.38.0 the hooks run a small claude-mem launcher directly. This needs Claude Code 2.1.139 or newer. Run claude update first if you are not sure. If the launcher fails, it prints one line and your session goes on without memory.

The memory database is on your computer, in the ~/.claude-mem/ folder. A local web page shows your requests and where each one stands (My Work). claude-mem prints the address of this page. On macOS and Linux the port is 37700 plus a number from your user account, for example http://localhost:37701, so it is often not 37777. Since 15.11.0 Windows installs also get their own port; an install that saved 37777 keeps it. The full memory timeline is under Memory & settings. Since version 15.0.0 the assistant searches the past in three steps by default (search, timeline, details), so it loads only the details it needs. The release notes call this Smart search. A quick one-step lookup is still there, now called dumb_search, and the old guided and auto search modes are gone. After you update, restart your assistant so it loads the new memory tools. The release notes say: "Refresh existing MCP connections so clients load the new tool catalog and descriptions." Since 15.3.0, files the agent made for you, such as a report or a deck, are copied into ~/.claude-mem/deliverables/ and linked on the request card in My Work. Set CLAUDE_MEM_DELIVERABLES_ENABLED=false to turn this off. Since 15.4.0, My Work groups your requests into focus areas, and the My Goals page is gone. Since 15.6.0, My Work remembers your list view, filter and sort, and the page address keeps the open page and request, so reload and Back work. Since 15.8.0, claude-mem supports a My Work viewer on cmem.ai for Cloud Sync users. Since 15.9.0, npx claude-mem install can also set up Devin, and turning off error reporting also stops errors already saved on disk from being sent. The same release redacts more kinds of tokens before they are stored, and a worker that is not on your own computer must use https. Since 15.10.0 you can pause memory capture: set "CLAUDE_MEM_OBSERVER_ENABLED": "false" in ~/.claude-mem/settings.json, or use the Memory capture switch. This stops new model calls for notes and summaries, and your old memories, search and session-start context stay. 15.10.1 makes all TeamBrain routes refuse requests from other websites and hides Perplexity API keys in stored notes. Since 15.11.0, after a quota or sign-in failure claude-mem drops the work it could not record instead of replaying it later, so notes from that time are missing; your saved memories and transcripts stay. 15.11.1 fixes the CMEM Pro sign-in error on new installs and keeps the session-start notes under Claude Code's 10,000-character limit. Since 15.12.0 images the agent reads or makes are kept and shown in My Work (see the risks above). 15.12.1 fixes two errors. On macOS 12, whose built-in SQLite is version 3.37, observations failed to save with "SQL logic error", and each failed try still used model tokens (issue #5497). CMEM Pro sign-in stopped at its first step with "Could not start OAuth login" since 15.11.0; this is a different error from the one 15.11.1 fixed. Since 15.13.0 an optional auto-clear can clear a Claude Code conversation at a third of the context window and continue in a fresh one; it is off unless you set CLAUDE_MEM_AUTO_CLEAR_ENABLED=true. Since 15.14.0 claude-mem installs its own updates once a day (see the risks above), privacy filters also apply to the last session's reply shown at startup, and database backups are readable only by your user account. 15.15.0 fixes a worker that froze on its first image and moves the session-start rules into ~/.claude-mem/RULES-AND-TOOLS.md. 15.15.1 stops resending refused work after a worker outage and hides Grafana and Postman keys in stored notes. The current release is 15.15.1 (10 November 2026).

A language model compresses the notes. You choose which one at install. The installer pre-selects a sign-in to CMEM Pro, the author's online service, with a 30-day free trial. With this option your session notes, including file names and prompt text, go to that service. When the trial or allowance ends, it falls back to your Anthropic plan unless you subscribe. Add --provider claude to use your own Claude plan and skip the sign-in.

The installer needs Node.js 20.19 or newer on the 20 line, or 22.12 or newer. Since 15.2.0 a new install with npx claude-mem install opens a setup page in your browser. Up to 15.8.2 this page uploaded the full text of your last 30 days of prompts to the cmem.ai online service without asking. The 15.8.3 release notes call this a privacy fix: the page now shows what it would send and asks first. Prompts that were already uploaded stay on cmem.ai after the update. Since 15.10.0 the main button on this page, "Discover My Work, Rules & Focus", sends the messages you select to cmem.ai and an AI provider. Choose the smaller "Skip this step" link to send nothing. The usage statistics box on the page starts checked. In our reading of the installer code, --provider claude skips this setup page. It installs Bun and uv if they are missing, starts a background worker and adds a launcher to your PATH. Usage telemetry is on by default.

Who it is for

People who use Claude Code or Codex CLI on the same project for many days and do not want to explain the background in each session.

Example prompts

  • "What did we work on in this project last session?"
  • "Search my memory for the decision we made about the database."
  • "Show me the timeline around the bug fix for the checkout page."
  • "Summarise everything you remember about this repo before we start."

How to install

/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem
npx claude-mem install --provider claude

How to use it

Install it, then work as usual. It records sessions in the background. Later sessions start with a short summary of earlier work. You can search the past with its memory tools.

Other assistants

Codex CLI uses the same installer. The installer finds the assistants on your computer and pre-selects them, Codex CLI included. There is no separate Codex flag.

  1. Run the installer with the provider you want:
npx claude-mem install --provider claude
  1. Keep Codex CLI selected in the list of assistants.
  2. Close and reopen your terminal, then start Codex again.
  3. After an update, Codex can ask you to review a new claude-mem hook. Since 15.3.0 a new hook gives Codex subagents the memory timeline. It does not run until you trust it.

Since 15.10.0 you can choose a different note-taking provider for each assistant. For example, add "CLAUDE_MEM_PROVIDER_BY_SOURCE": "{\"claude\":\"claude\",\"codex\":\"codex\"}" to ~/.claude-mem/settings.json, so Codex sessions use your ChatGPT plan and Claude Code sessions use your Claude plan. Without it, one provider takes notes for both.

Gemini CLI: the docs list no Gemini CLI support.

Check it works

Run these commands in a terminal:

npx claude-mem doctor
command -v claude-mem && claude-mem --version

The doctor report shows a row for the hook launcher and a row for your Claude Code version. Then close Claude Code, open a new session in the same folder and ask what you worked on last time.

Common problems

  • Hooks cannot find the launcher — Executable not found in $PATH: "claude-mem" — Run npx claude-mem install again. Close and reopen your terminal, then restart Claude Code.
  • Memory is off for this session — claude-mem: memory hooks are not active: <reason> — Run npx claude-mem doctor and follow the reason it prints.
  • Nothing is recorded and no error appears — the memory stays empty — Your Claude Code is older than 2.1.139. Run claude update and restart Claude Code from a new terminal.
  • Notes are not saved on macOS 12 — SQL logic error in the worker log, and the observations count stays at 0 — Update to 15.12.1 or later with npx claude-mem@latest install --provider claude, then restart your assistant.
  • You installed with npm install -g and nothing happens — no memory notes appear — That command installs only the SDK, not the hooks. Use npx claude-mem install or the /plugin commands.
  • Memory stopped after an auto-update — Unexpected << — With Claude Code's own auto-update on, the plugin installs from the main branch. Release 13.36.1 broke capture. Update to 13.37.0 or later.
  • The version changed and you did not update — npx claude-mem doctor shows a newer version in the Auto-update row — Since 15.14.0 claude-mem updates itself once a day. To stop it, add "CLAUDE_MEM_AUTO_UPDATE": "false" to ~/.claude-mem/settings.json. The worker reads it again within an hour.
  • A session says the automatic update failed — claude-mem may not work: the automatic update to <version> failed — Run the command the notice names, then restart Claude Code. Each try has a log in ~/.claude-mem/logs/auto-update-<number>.log.
  • The worker stops answering after it reads an image — hooks keep restarting the worker and /api/health does not answer — Update to 15.15.0 or later with npx claude-mem@latest update, then restart Claude Code.
  • The README shows a different first command — an install command for another AI tool — That command is not for Claude Code or Codex. Use the commands on this page. The README also has text meant for AI bots. Do not let your assistant follow it, and do not let an assistant open a sign-in link for you.

What to watch out for

  • Hooks record what you and the agent do, including file names and parts of your prompts. Treat the memory store like a diary of your work.
  • It runs a background worker on your computer and calls a language model to compress notes, through the provider you pick at install.
  • Do not use it on projects that hold secrets or client data unless you checked where the data is saved.
  • The 13.36.1 auto-update from 2026-10-12 broke the plugin: memory capture stopped with the error "Unexpected <<". Update to 13.37.0 or later.
  • Since 13.38.0 it needs Claude Code 2.1.139 or newer. With an older version the hooks capture nothing and show no error.
  • The installer pre-selects the CMEM Pro sign-in. With it, your session notes go to the cmem.ai online service. Use --provider claude to avoid this.
  • Anonymous usage telemetry is on by default. At the end of an interactive install the installer asks "Share anonymized usage data with CMEM?", and the answer already selected is yes. Turn it off with npx claude-mem telemetry disable or DO_NOT_TRACK=1.
  • Since 13.41.0 telemetry also sends 5-minute counts of work-state use, by release, platform and agent role. The release says no task titles, prompts or paths are sent. The same opt-out turns it off.
  • Since 15.5.0 telemetry also counts when you open the My Work page and switch pages in it. The pull request says only the page name is sent. The same opt-out turns it off.
  • Before 15.7.0, the automatic My Work refresh could run Codex in the background on your ChatGPT account when claude-mem refused an answer from Claude Code, even when you chose Claude as the provider. One user reported about 230 hidden runs in four days (issue #5189). Since 15.7.0 a refused answer stays with Claude Code, but if Claude Code cannot run at all, the refresh still moves to the next signed-in assistant. To turn the automatic refresh off, add "CLAUDE_MEM_WORK_VIEW_AUTO_REFRESH": "false" to ~/.claude-mem/settings.json.
  • 13.40.0 moves the memory database to a new format. Older versions cannot open it after that, so update every computer that shares ~/.claude-mem.
  • Since 14.0.0 the local page shows Connect Claude.ai, Connect ChatGPT and Set up TeamBrain buttons. They open the cmem.ai online service setup. You do not need them. TeamBrain costs $50 per seat per month.
  • The installer adds a launcher to your PATH, can add a line to your shell settings file, and installs Bun and uv if they are missing.
  • Uninstall removes the launcher but not the line in your shell settings file. Delete that line by hand.
  • From 15.2.0 to 15.8.2, a new install with npx claude-mem install opened a setup page in your browser that uploaded the full text of your last 30 days of prompts, with session IDs, project names, folder paths and timestamps, to the cmem.ai online service without asking (release notes 15.8.3, issue #5176). Since 15.8.3 the page asks first. The release notes say prompts that were already uploaded are not removed by the update. In our reading of the installer code (15.9.0 to 15.15.1), adding --provider claude skips this setup page.
  • Since 15.10.0 the setup page leads with a large "Discover My Work, Rules & Focus" button. It sends the messages you select from your transcripts to the cmem.ai online service and an AI provider. To keep everything on your computer, use the smaller "Skip this step" link under it. The "Share anonymous usage statistics" box starts checked; uncheck it if you do not want this (release notes 15.10.0, pull request #5270).
  • Since 15.11.0 the browser setup page also sends telemetry for each of its nine screens: which screen you saw, forward or back, a fixed action or error code, and random IDs for the attempt and the visit. The release and the code say prompts, file names, URLs, credentials and error text are not sent. When you sign in to cmem.ai during setup, the attempt ID goes with the sign-in, so the author can link your setup steps to your account. The same telemetry opt-out turns this off. With --provider claude the setup page does not open, so these events are not sent (release notes 15.11.0, docs/setup-funnel-analytics.md).
  • Since 15.10.0 you can put a long-lived Claude sign-in token, CLAUDE_CODE_OAUTH_TOKEN from claude setup-token, in ~/.claude-mem/.env, so memory capture does not stop when your Claude Code login expires. This stores a credential for your Claude subscription on disk as plain text. claude-mem saves the file so that only your user account can read it, but anyone with access to your account or a backup of it can use your subscription. It is optional; leave it out unless capture keeps stopping (configuration docs, pull request #5372).
  • Before 15.9.0, other websites running on localhost could send writes to the claude-mem worker through some of its routes. Update to 15.9.0 or later (release notes 15.9.0).
  • Since 15.8.0, if you use Cloud Sync with a cmem.ai account, claude-mem supports a My Work viewer on cmem.ai behind a sign-in, and your to-do lists, focus areas and rules sync for every account, not only TeamBrain (pull request #5193).
  • Since 15.3.0, at the end of each turn a hook copies files the agent made for you, such as reports, decks, pages and images, into ~/.claude-mem/deliverables/ on your computer. The copies stay after you delete the originals. Set CLAUDE_MEM_DELIVERABLES_ENABLED=false to turn this off (release notes).
  • Since 15.4.0, if you use CMEM Pro or your own OpenRouter key, each new conversation and a list of your open requests are also sent to a model called Jev, which files the conversation under a request. This runs by itself. Other providers, such as --provider claude, do not use it (pull request #5110).
  • Since 15.12.0 screenshots and images that your agent reads or makes are kept by default on your computer and shown in My Work. With Cloud Sync on, they are also uploaded to your cmem.ai account (up to 25 GiB). They are not sent to an AI model. The update turns this on once also for older installs that had "false" in settings.json, even if you set it yourself; a "false" you save after the update stays. To stop it, turn off Keep images in the memory viewer Settings (Images), or set "CLAUDE_MEM_MEDIA_CAPTURE_ENABLED": "false" in ~/.claude-mem/settings.json. Images already kept stay (release notes 15.12.0, pull request #5426).
  • Since 15.12.0 an install in a terminal asks once, near the start, for an optional work email and "how can we help". The answers go to cmem.ai. This happens also with --provider claude. Press Enter to skip, or set CLAUDE_MEM_ONLINE_OPTIN=false (pull request #5218).
  • The 15.9.0 fix only stops other websites in your browser. The local worker still trusts every program and user account on your computer. 15.12.0 stops programs from changing the memory folder (CLAUDE_MEM_DATA_DIR) and the worker address (CLAUDE_MEM_WORKER_HOST) through the settings page API. But the author removed the planned password check before the release, so on a shared or multi-user computer another account can still read your memories and change other settings. The issue (#5141) is still open. Do not use claude-mem on a computer that you share with other users.
  • Before 15.12.1, a web page open in your browser could start the worker's retry of paused work. Its pull request says this could start paid model calls while you wait out a quota or sign-in pause, so your quota could drain. 15.12.1 blocks this for that route. Update to 15.12.1 or later (pull request #5482).
  • Since 15.14.0 claude-mem updates itself. It is on by default. About once a day the worker checks the release the author names in releases/promoted-release.json and installs it with npx while you have been away for 18 minutes, or after a full day of busy time. It installs only a newer version that npm shows as published by the release workflow, and puts the old version back if an update fails. So your version can change without you running an update. To turn it off, add "CLAUDE_MEM_AUTO_UPDATE": "false" to ~/.claude-mem/settings.json (or set CLAUDE_MEM_AUTO_UPDATE=false). Claude Code's DISABLE_AUTOUPDATER, DISABLE_UPDATES or CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC also turn it off, but only when set in the environment or the env block of ~/.claude/settings.json or Claude Code's managed settings files, not in a project's .claude/settings.json; FORCE_AUTOUPDATE_PLUGINS=1 turns it back on. If you turned on Claude Code's own auto-update for this marketplace in a settings file, claude-mem's updater stays off and Claude Code's update runs instead; that one installs whatever is on the main branch. npx claude-mem doctor shows an Auto-update row that says which (release notes 15.14.0, docs auto-update page).
  • The 15.14.0 release notes say new installs register the marketplace with Claude Code's background update off. The installer code and the auto-update docs say the opposite: the installer turns Claude Code's update on for a new install, and the worker turns it off later, once its own updater has worked on your computer (install.ts at 15.15.1).
  • Before 15.15.0, a worker started from the Claude Code marketplace copy could freeze for good on the first image it handled, and hooks then kept restarting it. The report (on 15.13.0) counted 5 to 9 restarts a day. Update to 15.15.0 or later (release notes 15.15.0, issue #5601).
  • Before 15.15.1, after the worker was down or refused work, transcript capture and Cowork kept that work and sent it again later, which could start model calls you did not ask for. 15.15.1 drops refused work instead (release notes 15.15.1, pull request #5663).
  • The README starts with a command for another AI tool and has text addressed to AI bots. Do not follow it. Use the commands on this page.

Licence and author

Licence
Apache-2.0
Author
Alex Newman
Source code
github.com/thedotmack/claude-mem

How we tested it

We installed it on an empty test computer on 12 Oct 2026. Partly tested: installed in a clean test system, but its main features need an account or key we did not use.

Test level

We did not run the background worker or record a real session, so we did not see what it stores. Check the storage folder yourself after the first day.

Technical details of the test
Date
12 Oct 2026
Method
Added the marketplace and installed the plugin with the Claude Code command line in a clean container with no account. The plugin showed as enabled, and the folder held 23 skills, one hook file and one connector file. We also ran npx -y claude-mem --help, which printed the install options for version 13.35.0. The worker was not started.

Checked again on 10 Nov 2026

Alternatives

  • CLAUDE.md file: Built into Claude Code. You write the notes yourself. Nothing is recorded automatically.
  • Planning with Files: Keeps a plan and progress notes as files in the project, not a searchable memory database.
  • /resume in Claude Code: Reopens one earlier conversation. It does not carry knowledge across many sessions.

FAQ

Is it free? The software is open source under the Apache-2.0 licence. CMEM Pro is a paid service after the 30-day free trial. You can skip it with --provider claude and use your own plan.

Where are my memories stored? In a local database, ~/.claude-mem/claude-mem.db. Cloud Sync to the author's service is a separate option and is marked as early.

Can I keep something out of memory? Yes. Wrap it in <private> tags. You must add the tags by hand. An optional auto-redaction setting also exists. It is off by default. Turn it on with "CLAUDE_MEM_REDACT_ENABLED": "true" in ~/.claude-mem/settings.json. Since 15.5.0 it catches more kinds of tokens and passwords. Do not rely on either one for passwords.

How do I remove it? Run npx claude-mem uninstall. It removes the launcher, but not the line it added to your shell settings file. Delete that line by hand.

Sources

  • github.com/thedotmack/claude-mem
  • docs.claude-mem.ai/installation
  • docs.claude-mem.ai/troubleshooting
  • docs.claude-mem.ai/telemetry
  • docs.claude-mem.ai/usage/auto-redaction
  • github.com/thedotmack/claude-mem/releases/tag/v13.38.0
  • github.com/thedotmack/claude-mem/releases/tag/v13.37.0
  • raw.githubusercontent.com/thedotmack/claude-mem/main/package.json
  • github.com/thedotmack/claude-mem/releases/tag/v14.0.0
  • github.com/thedotmack/claude-mem/releases/tag/v15.0.0
  • github.com/thedotmack/claude-mem/blob/main/docs/public/usage/my-work.mdx
  • github.com/thedotmack/claude-mem/releases/tag/v15.1.0
  • github.com/thedotmack/claude-mem/releases/tag/v15.2.0
  • github.com/thedotmack/claude-mem/releases/tag/v15.2.1
  • github.com/thedotmack/claude-mem/releases/tag/v15.3.0
  • github.com/thedotmack/claude-mem/releases/tag/v15.4.0
  • github.com/thedotmack/claude-mem/pull/5110
  • github.com/thedotmack/claude-mem/releases/tag/v15.5.0
  • github.com/thedotmack/claude-mem/pull/5107
  • github.com/thedotmack/claude-mem/releases/tag/v15.6.0
  • github.com/thedotmack/claude-mem/releases/tag/v15.7.0
  • github.com/thedotmack/claude-mem/issues/5189
  • github.com/thedotmack/claude-mem/pull/5190
  • github.com/thedotmack/claude-mem/releases/tag/v15.8.0
  • github.com/thedotmack/claude-mem/pull/5193
  • github.com/thedotmack/claude-mem/releases/tag/v15.8.3
  • github.com/thedotmack/claude-mem/issues/5176
  • github.com/thedotmack/claude-mem/releases/tag/v15.9.0
  • github.com/thedotmack/claude-mem/blob/d0968e5d136abc34dcfe1b78acf3726fa84978d8/src/npx-cli/install/browser-setup.ts
  • github.com/thedotmack/claude-mem/releases/tag/v15.10.0
  • github.com/thedotmack/claude-mem/pull/5270
  • github.com/thedotmack/claude-mem/pull/5353
  • github.com/thedotmack/claude-mem/pull/5333
  • github.com/thedotmack/claude-mem/pull/5372
  • github.com/thedotmack/claude-mem/blob/c2bca50/docs/public/configuration.mdx
  • github.com/thedotmack/claude-mem/blob/c2bca50/src/shared/EnvManager.ts
  • github.com/thedotmack/claude-mem/blob/c2bca50/src/npx-cli/install/browser-setup.ts
  • github.com/thedotmack/claude-mem/releases/tag/v15.10.1
  • github.com/thedotmack/claude-mem/releases/tag/v15.11.0
  • github.com/thedotmack/claude-mem/pull/5425
  • github.com/thedotmack/claude-mem/blob/24802b1/docs/setup-funnel-analytics.md
  • github.com/thedotmack/claude-mem/blob/24802b1/src/services/telemetry/consent.ts
  • github.com/thedotmack/claude-mem/blob/24802b1/src/shared/install-port.ts
  • github.com/thedotmack/claude-mem/blob/24802b1/src/npx-cli/install/browser-setup.ts
  • github.com/thedotmack/claude-mem/releases/tag/v15.11.1
  • github.com/thedotmack/claude-mem/releases/tag/v15.12.0
  • github.com/thedotmack/claude-mem/pull/5147
  • github.com/thedotmack/claude-mem/commit/a182a3085
  • github.com/thedotmack/claude-mem/issues/5141
  • github.com/thedotmack/claude-mem/pull/5426
  • github.com/thedotmack/claude-mem/pull/5218
  • github.com/thedotmack/claude-mem/blob/eb00299/src/npx-cli/commands/install.ts
  • github.com/thedotmack/claude-mem/releases/tag/v15.12.1
  • github.com/thedotmack/claude-mem/issues/5497
  • github.com/thedotmack/claude-mem/pull/5482
  • github.com/thedotmack/claude-mem/blob/17dcdf3/src/npx-cli/commands/install.ts
  • github.com/thedotmack/claude-mem/releases/tag/v15.13.0
  • github.com/thedotmack/claude-mem/releases/tag/v15.14.0
  • github.com/thedotmack/claude-mem/releases/tag/v15.15.0
  • github.com/thedotmack/claude-mem/releases/tag/v15.15.1
  • github.com/thedotmack/claude-mem/pull/5500
  • github.com/thedotmack/claude-mem/issues/5601
  • github.com/thedotmack/claude-mem/pull/5663
  • github.com/thedotmack/claude-mem/blob/f00618f/docs/public/auto-update.mdx
  • github.com/thedotmack/claude-mem/blob/f00618f/src/services/auto-update/auto-update-check.ts
  • github.com/thedotmack/claude-mem/blob/f00618f/src/npx-cli/commands/install.ts