AI column

Coding@donghyeok99Staff

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

Each tool call in session 1 drops a record into SQLite; when session 2 opens, those records arrive first, so continue from last time is enough.
Each tool call in session 1 drops a record into SQLite; when session 2 opens, those records arrive first, so continue from last time is enough.
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.

Claude Code works on the left; observation cards pile up in the viewer
Claude Code works on the left; observation cards pile up in the viewer

What people made with it

dev.toshimo42282026-02-27

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
likes 5 · comments 1 (2026-11-01 as of)dev.to ↗

How it runs inside

  1. 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. 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. 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. 4

    Observer model → SQLite + Chroma

    Observations storedThe observations go into SQLite and into Chroma for semantic search.src/services/worker/agents/ResponseProcessor.ts
  5. 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. 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

continue from last time, in a new sessionThe last session's observations are already in context, so work resumes on the spot
search(query="authentication bug", type="bugfix", limit=10)A short list with IDs, then get_observations for just the ones you pick

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

Sign in to post, comment and like.Sign in

Report

Reason

Read the community rules