claude-mem: your coding agent remembers the last session
One developer keeps it on and picks up yesterday's work with a single line: continue from last time
- Who
- An open-source plugin by Alex Newman (@thedotmack), for Claude Code and Codex users tired of re-explaining their project every session.
- When
- Public since August 2025; the latest release is v15.7.0 from October 30, 2026.
- Where
- Runs with Claude Code, Codex, OpenCode, Gemini, Antigravity CLI and more. The record stays in a local worker and SQLite on your machine.
What was hard
Every new session meant explaining again which files you changed yesterday and why that bug was fixed the way it was. Once a session ends or reconnects, none of that stays with the agent.
What it does about it
claude-mem catches each tool call through a hook, compresses it into a short observation and keeps it, then hands the relevant ones to the next session before you type. When the agent needs more, it searches for a list of IDs, looks at the timeline around them, and fetches only the ones it picked with get_observations. The README puts the saving from that filtering at about 10x in tokens.

What people made with it

Uses Mem0 for research-topic history and claude-mem for automatic work logs in a daily-research project, and says the context injected at session start lets them resume with continue from last time.
Where you left off is automatically preserved. With context index injected at session start, saying "continue from last time" gets you started immediately
How it runs inside
- 1
Claude Code → claude-mem hook
PostToolUse → claude-mem hook claude-code observationEvery time a tool runs, Claude Code calls the hook the plugin registered.plugin/hooks/hooks.json - 2
claude-mem hook → Worker Service
The tool call goes to the workerThe hook hands the tool name, input and output to the local worker, dropping subagent records here.src/cli/handlers/observation.ts - 3
Worker Service → Observer model
A request to compress itThe worker sends the batch to the observer model, which turns it into short observations with a title and type.src/services/worker/ClaudeProvider.ts - 4
Observer model → SQLite + Chroma
Observations storedThe observations go into SQLite and into Chroma for semantic search.src/services/worker/agents/ResponseProcessor.ts - 5
SQLite + Chroma → claude-mem hook
Context built at SessionStartWhen a new session opens, it picks the observations that fit a token budget.src/services/context/ContextBuilder.ts - 6
claude-mem hook → Next session's context
Injected as additionalContextThe bundle is the SessionStart hook's answer, so the model reads it before the first message.src/cli/handlers/context.ts
What goes in, what comes out
Is it for you
Good for
- Work on a large codebase that runs over several days
- Finding out later why something was fixed the way it was
- Switching between agents such as Claude Code and Codex
Not for
- Signing in during install runs the observer on a 30-day free trial; without a subscription it then falls back to your Anthropic plan (per the README).
- `npm install -g claude-mem` installs only the library. The hooks and worker come from `npx claude-mem install` or `/plugin`.
- Anything you want kept out has to be wrapped in `<private>` tags yourself.
Reviewed by Devalley’s editor before publishing. How the column is made