thezakuloGet the newsletter
← All setup guides

Setup guide · 5 steps · about 10 minutes

How to start using thedotmack/claude-mem

Claude-Mem is a persistent memory system that captures your coding agent's tool activity during sessions, compresses it into observations with a second AI agent, and injects relevant context into future sessions so your agent starts where it left off.

Built from the official docs: GitHub - thedotmack/claude-mem: Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More · raw.githubusercontent.com · checked 13 November 2026

Install for Claude Code (npx)

  1. Check Node.js

    You need Node.js 20.19 or later in the 20.x line, or 22.12 or later. On Windows, make sure Node.js and npm are on your PATH, and restart your terminal if you install it.

    node --version
  2. Run the installer

    The installer finds the agents on your machine and asks which ones to set up. It auto-installs Bun and uv if they are missing.

    npx claude-mem install
  3. Answer the setup prompts

    The installer sets everything up, then asks you to sign in to claude-mem in your browser with an email magic link (no card required to sign in). After sign-in you pick a memory provider: the claude-mem observer, your own OpenRouter or Gemini key, or your Anthropic plan.

  4. Restart your agent

    Restart Claude Code so it loads the hooks. Context from previous sessions will then automatically appear in new sessions.

  5. Start working

    Just start working: observations stream in from your first prompt, and your second session in a project opens with memory from the first. Memory injection starts on your second session in a project.

Check it worked

Open a second session in the same project and confirm it starts with a compact index of context from your first session. You can also run `npx claude-mem doctor`, which checks Bun, uv, the hook launcher, and the worker and tells you what to fix.

Try these first

Get every issue by email

One email a week with the written issue. Free, one-click unsubscribe

Subscribe