Skip to main content
Claude Code Memory Cache

// PROJECT

Claude Code Memory Cache

// OVERVIEW

About this project

A persistent memory system that gives Claude Code long-term recall. It logs every session automatically and stores the decisions, learnings, and preferences in a vector database that later sessions search by meaning, so context carries across projects, machines, and weeks apart.

// ARCHITECTURE

System architecture

Every Claude Code session is captured by a Stop-hook that streams the full transcript to disk, then distills the important parts — decisions, learnings, and preferences — into a local ChromaDB vector store. An MCP server exposes semantic search over that store, so any future session, on any project or machine, can recall relevant past context by meaning rather than keywords.

Capture hook

A session-end hook appends each turn to a running note as it happens, so nothing is lost even if a session ends abruptly.

Vector store

Distilled memories are embedded and stored locally in ChromaDB — no cloud, no per-query cost — and retrieved by semantic similarity.

MCP server

A Model Context Protocol server gives Claude Code first-class tools to save and search memories mid-session.

Knowledge graph

A companion graph links memories and code structure, surfaced in Obsidian as a navigable map of past work.