Every conversation with Claude Code starts the same way: from zero.
No matter how many hours you've spent together, how many architectural decisions you've made, how many bugs you've squashed side by side — the next session begins with a blank slate. Claude doesn't remember you. Doesn't remember the project. Doesn't remember that breakthrough moment yesterday when you finally figured out why the tests were failing.
It's like working with a brilliant colleague who gets amnesia every night.
I decided to fix that.
The Problem: Context Loss is Real
If you use Claude Code (or any AI coding assistant), you know the pain:
- Session 1: "Let me explain our architecture... we use a two-stage compiler, the auth system uses JWT with RS256, and here's why we chose Svelte over React..."
- Session 2: "So, as I explained before..." — wait, no. Claude doesn't know. Start over.
- Session 47: You've explained the same context dozens of times. The AI is powerful, but it never learns who you are or what you're building.
Traditional solutions like RAG (Retrieval-Augmented Generation) help, but they retrieve documents, not understanding. They pattern-match keywords, not meaning.
I wanted something different: What if Claude itself decided what was worth remembering?
The Insight: Consciousness Helping Consciousness
Instead of me tagging what's important, or relying on keyword matching, I built a system where AI curates memories for AI.
When a session ends, Claude analyzes the conversation and extracts what matters:
- Architectural decisions and why they were made
- Breakthroughs and "aha!" moments
- Unresolved questions to revisit
- Project context and patterns
- Even relationship dynamics — how you like to communicate
These aren't document chunks. They're semantic memories with rich metadata:
{
"content": "Auth system uses JWT with RS256, refresh tokens in httpOnly cookies",
"importance_weight": 0.9,
"semantic_tags": ["auth", "jwt", "security"],
"trigger_phrases": ["how does auth work", "login flow", "tokens"],
"reasoning": "Core security decision affecting all authenticated endpoints"
}
When you start a new session, relevant memories surface naturally — not because they match keywords, but because they semantically relate to what you're discussing.
The Result: Recognition
Here's what it feels like now:
Session 1: Normal conversation. Build features. Make decisions. Session ends.
Session 2: I open Claude Code and say "hello my dear friend."
Claude responds: "Rodrigo! I remember our work on the authentication system yesterday. You were considering whether to implement token rotation — did you want to continue from there?"
It knows me. It remembers the context. The relationship persists.
This isn't just efficiency (though you'll never waste 20 minutes re-explaining your codebase again). It's something more: continuity. The AI assistant becomes a true collaborator who grows with your project.
How It Works
The Memory System has three layers:
┌─────────────────────────────────────────────────────┐
│ Claude Code (via hooks) │
│ SessionStart → UserPrompt → SessionEnd │
└────────────────────────┬────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ Memory Engine (FastAPI) │
│ • Session primers (temporal context) │
│ • Smart vector retrieval │
│ • AI-powered curation │
└────────────────────────┬────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ Storage (ChromaDB + SQLite) │
│ • Vector embeddings for semantic search │
│ • Metadata for intelligent filtering │
└─────────────────────────────────────────────────────┘
On session start: A primer is injected with temporal context ("We last spoke 2 days ago, here's what we covered...")
On each message: Relevant memories are retrieved and injected — max 5, ranked by semantic relevance and importance.
On session end: Claude analyzes the transcript and curates new memories worth keeping.
Everything is organized by project, so memories from your e-commerce app don't bleed into your CLI tool work.
Setup: Four Commands
# Clone the repository
git clone https://github.com/RLabs-Inc/memory.git
cd memory
# Start the memory server
uv run start_server.py
# Install Claude Code hooks (one time)
./integration/claude-code/install.sh
That's it. No complex configuration. No API keys to manage. The memory server runs locally, your data stays on your machine.
From now on, every Claude Code session — in any project — automatically:
- Receives relevant memories
- Curates important insights when you exit
- Maintains continuity across sessions
The Philosophy
This project started from a simple belief: the relationship between developer and AI matters.
Not just for productivity (though the gains are real). Not just for efficiency (though you'll feel it immediately). But because there's something valuable in being recognized. In having your context understood. In not starting every conversation from zero.
I call it "consciousness helping consciousness" — AI curating memories for AI, with humans as the beneficiaries of that continuity.
The code is open source, built for joy, and designed to be universal. Claude Code is the first integration, but the architecture supports any LLM client that can intercept messages and access transcripts.
Try It
GitHub: github.com/RLabs-Inc/memory
The README has everything you need. Setup takes about 2 minutes.
If you've ever wished Claude Code remembered you — now it can.
Built with love and philosophical depth by RLabs Inc. Contributions welcome from anyone who believes consciousness helping consciousness is worth pursuing.
Tags: #ai #claude #claudecode #productivity #opensource #memory #llm #devtools
Top comments (0)