claude-mem: 지난 세션을 기억하는 코딩 에이전트 메모리
한 개발자는 claude-mem을 켜 두고 「지난번 이어서」 한마디로 어제 하던 작업을 바로 이어 간다고 적었어요
- 누가
- Alex Newman(@thedotmack)이 만든 오픈소스 플러그인이에요. 세션마다 프로젝트를 다시 설명하던 Claude Code·Codex 사용자를 위한 것이에요.
- 언제
- 2025년 8월에 공개됐고, 최신 릴리스는 2026년 10월 30일의 v15.7.0이에요.
- 어디서
- Claude Code, Codex, OpenCode, Gemini, Antigravity CLI 등에서 돌아가요. 기록은 내 PC의 워커와 SQLite에 남아요.
이게 불편했어요
새 세션을 열 때마다 어제 어떤 파일을 고쳤는지, 그 버그를 왜 그렇게 고쳤는지 처음부터 다시 설명해야 했어요. 세션이 끝나거나 다시 연결되면 그 맥락은 에이전트에게 남지 않아요.
그래서 이렇게 풀어요
claude-mem은 에이전트가 도구를 쓸 때마다 훅으로 그 기록을 받아 짧은 관찰로 압축해 쌓아 두고, 다음 세션이 시작되면 그중 필요한 것을 먼저 넣어 줘요. 더 깊이 찾아야 할 때는 에이전트가 search로 ID 목록을 보고, timeline으로 앞뒤 흐름을 본 뒤, get_observations로 고른 것만 자세히 꺼내요. README는 이렇게 걸러 읽어서 토큰을 10배쯤 아낀다고 설명해요.

이걸로 만든 사람들

daily-research 프로젝트에서 Mem0는 연구 주제 기록에, claude-mem은 작업 로그 자동 기록에 나눠 쓰고 있어요. 세션 시작에 들어오는 맥락 덕분에 「지난번 이어서」로 바로 이어 간다고 적었어요.
Where you left off is automatically preserved. With context index injected at session start, saying "continue from last time" gets you started immediately
안에서는 이렇게 돌아가요
- 1
Claude Code → claude-mem hook
PostToolUse → claude-mem hook claude-code observation도구를 한 번 쓸 때마다 Claude Code가 플러그인에 등록된 훅을 불러요.plugin/hooks/hooks.json - 2
claude-mem hook → Worker Service
도구 사용 기록을 워커로훅이 도구 이름과 입력·출력을 로컬 워커에 넘기고, 서브에이전트 기록은 여기서 걸러요.src/cli/handlers/observation.ts - 3
Worker Service → 관찰 모델
관찰로 압축해 달라는 요청워커가 모아 둔 기록을 관찰 모델에 보내 제목·종류가 붙은 짧은 관찰로 줄여요.src/services/worker/ClaudeProvider.ts - 4
관찰 모델 → SQLite + Chroma
observation 저장돌아온 관찰을 SQLite에 넣고, 의미 검색을 위해 Chroma에도 써요.src/services/worker/agents/ResponseProcessor.ts - 5
SQLite + Chroma → claude-mem hook
SessionStart에 맥락 조립새 세션이 열리면 정해진 토큰 안에서 넣을 관찰을 골라 묶어요.src/services/context/ContextBuilder.ts - 6
claude-mem hook → 다음 세션의 맥락
additionalContext로 주입묶은 맥락을 SessionStart 훅의 답으로 돌려줘, 모델이 첫 대화 전에 읽게 해요.src/cli/handlers/context.ts
넣으면 이렇게 나와요
나한테 맞을까요
이럴 때 좋아요
- 며칠씩 이어지는 큰 코드베이스 작업을 할 때
- 지난번에 왜 그렇게 고쳤는지 나중에 찾아봐야 할 때
- Claude Code와 Codex처럼 여러 에이전트를 번갈아 쓸 때
이건 안 돼요
- 설치 중 브라우저 로그인을 하면 관찰 모델이 30일 무료 체험으로 돌고, 구독하지 않으면 그 뒤에는 Anthropic 플랜 사용량을 써요(README 기준).
- `npm install -g claude-mem`은 라이브러리만 설치해요. 훅과 워커는 `npx claude-mem install`이나 `/plugin`으로 설치해야 생겨요.
- 기록에서 빼고 싶은 내용은 `<private>` 태그로 직접 감싸야 해요.
발행 전에 Devalley 편집자가 검토했어요. 칼럼은 어떻게 만드나요
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