cc-memory
A Claude Code plugin that gives your AI assistant a persistent, self-organizing memory that grows smarter across projects and sessions.
Claude Code's built-in auto-memory writes flat files. They accumulate without maintenance, contradict each other over time, and stay locked inside individual projects. The cc-memory plugin transforms this raw material into a living knowledge base: it detects cross-project patterns, forms higher-level concepts, tracks which knowledge is actively useful, and surfaces the right context at the right time.
Why This Is Different
Most agent memory systems optimize for retrieval: store things, find similar things later. cc-memory optimizes for understanding: it detects that "always read config before invoking a tool" and "validate the OG image before posting to social media" are instances of the same structural pattern, despite having nothing in common on the surface.
The loose inspiration is Hofstadter and Sander's Surfaces and Essences, which argues that analogy-making is the core cognitive act. Their work describes concepts as fluid, constantly shifting things that reshape themselves every time they encounter a new situation. cc-memory borrows one narrow idea from that: recognizing structural similarity across different domains. But the implementation is far more rigid than anything Hofstadter would endorse. Concepts here are named files with fixed membership lists and YAML frontmatter. They do not slide, blend, or re-categorize themselves on the fly the way Hofstadter's mental categories do. This is not an implementation of his theory. It is a pragmatic system that picked up one useful aspect and mapped it onto a domain where markdown files and shell scripts are the medium, and that medium cannot reflect the full dynamic nature of what Surfaces and Essences describes.
cc-memory uses Claude itself as the analogy engine: the LLM reads your accumulated memories and finds the patterns that connect them. The result is concepts: named abstractions distilled from concrete experiences across your projects. These concepts become part of your working knowledge in every future session.
What you get that other memory systems don't
| Capability | cc-memory | Typical agent memory (Mem0, Letta, etc.) |
|---|
| Cross-project pattern detection | Concepts formed from memories spanning multiple projects | Memories scoped to single conversations or agents |
| Structural analogy | Finds deep patterns regardless of surface differences | Embedding similarity (surface-level matching only) |
| Activation tracking | Knows which memories are actively useful vs. quietly decaying | All memories treated equally |
| Lifecycle governance | Staleness detection, triage, contradiction resolution | Accumulate-only, no maintenance |
| Human-readable corpus | Markdown files you can browse, edit, and version | Vector stores or databases you can't inspect |
| Memory vault | Synced knowledge base in a plain directory (browsable with Obsidian or any editor) | No knowledge browsing layer |
| No infrastructure | File-based, runs locally, no database or API server | Often requires Redis, Neo4j, or cloud services |
Why File-Based Memory Works
cc-memory stores everything as markdown files with YAML frontmatter. No database. No vector store. No API server. This is a deliberate design choice, not a limitation.
You can read and fix your memories. Every memory is a .md file you can open in any editor. Run rg "testing" ~/.claude/projects/*/memory/ to find every memory about testing across all projects. Fix a wrong memory with your editor. Try doing that with embeddings in a vector database.
Memories work with git. They are files in ~/.claude/projects/, and the Obsidian copies live in your vault. You can diff what changed between sessions, revert a bad batch of memories, or track how your knowledge evolved over months. Version history comes for free.
No infrastructure to maintain. cc-memory runs entirely on your machine with tools you already have: Python, uv, and Claude Code. No Redis instance. No API keys. No cloud service that might go down or change its pricing. Works on an airplane.
Markdown is the native language of LLMs. Claude reads markdown better than any other format. There is no serialization layer, no schema mapping, no ORM equivalent. The file Claude reads is the file you edit. What you see is what Claude gets.
Your existing tools already work. Pipe memories through jq. Search them with rg. Transform them with awk. Open them in Obsidian and build dashboards. Write a shell script that processes your memory corpus. The unix philosophy applies: small tools, plain text, composition.