Two Approaches to AI Memory: Manual Curation vs. Automatic Capture
When working with AI coding assistants like Claude Code, one of the biggest challenges is maintaining context across sessions. How do you ensure your AI remembers hard-won lessons, project-specific quirks, and universal patterns that apply across codebases?
I recently compared two fundamentally different approaches to solving this problem: a manually-curated, skill-based system (my current setup) and claude-mem, an automatic capture plugin. Here's what I learned.
The Tale of Two Memory Systems
Approach 1: Manual Curation with Qdrant (My Setup)
My system is built around the philosophy that quality trumps quantity. It uses:
- Qdrant vector database for semantic search
- Dual storage: Human-readable markdown files + vector embeddings
- 10 role-based collections: backend-patterns, frontend-patterns, ai-patterns, devops-patterns, etc.
- Extreme selectivity: Store only 0-1 insights per task
How it works:
Memory storage is triggered manually via skills or automatically when the system detects "frustration signals" (yes, it listens for profanity and phrases like "this is ridiculous" - those are the moments when real learning happens).
The workflow:
- Format memory with Title, Description, Content, Tags
- Detect role (backend, frontend, AI, etc.)
- Search for duplicates to avoid redundancy
- Decide: Create new, merge with existing, or update
- Store in both markdown and vector DB
**Title:** JWT Refresh Token Race Condition in Concurrent Requests
**Description:** When multiple API calls happen simultaneously with
expired access tokens, concurrent refresh requests cause race
conditions leading to auth failures.
**Content:** [Detailed analysis of attempts and solution]
**Tags:** #backend #jwt #auth #race-condition #failure
The recall system uses a specialized memory-only agent that has ZERO file system access - it can only interact with the vector database via MCP (Model Context Protocol) tools. This prevents the agent from reading hundreds of files when you just want to search memories.
Approach 2: Automatic Capture with Claude-Mem
Claude-mem takes the opposite approach: capture everything, compress with AI.
- Chroma vector database + SQLite with FTS5 (hybrid search)
- 5 lifecycle hooks: SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd
- Automatic context injection into future sessions
- Web UI at localhost:37777 for real-time memory streaming
How it works:
A background worker service automatically captures ALL tool usage observations during your coding session. Every file read, every command executed, every edit made gets stored. Then AI compresses these observations into semantic summaries.
The clever part: 3-layer progressive disclosure. Instead of dumping all context into your session, it shows:
- Preview layer (minimal tokens)
- Context layers (expandable)
- Full content (on demand)
This approach reportedly saves ~10x tokens compared to naive full-context injection.
Additional features:
- Privacy tags to exclude sensitive content
- Citation system to reference past observations by ID
- Token cost visibility before loading context
- Natural language search: "show me when we fixed the JWT bug"
Head-to-Head Comparison
| Dimension | Manual Curation | Claude-Mem |
|---|---|---|
| Philosophy | Curated universal patterns | Comprehensive session capture |
| Storage | 0-1 insights per task | Every tool observation |
| Trigger | Skills + frustration detection | Automatic lifecycle hooks |
| Search | Vector only (Qdrant) | Hybrid: Vector + full-text (Chroma + SQLite) |
| UI | Markdown files | Web viewer at localhost:37777 |
| Context Loading | Manual recall with --recall | Automatic injection |
| Privacy | Don't store sensitive data | Privacy tags per observation |
| Token Efficiency | Load full memories | 3-layer progressive disclosure |
| Cross-Project | ✅ Universal patterns | ❌ Session-focused |
| Session Continuity | ❌ Manual | ✅ Automatic across reconnects |
When to Use Each Approach
Manual Curation is Better For:
✅ Building a knowledge base of proven patterns that apply across projects
✅ Learning from failure with deep post-mortem analysis
✅ Preventing context pollution - only high-value insights make it through
✅ Cross-project wisdom - "I learned this in Project A, now I'm applying it to Project B"
✅ Explicit control - you decide what's worth remembering
Example use case: You spent 4 hours debugging a race condition in JWT refresh token handling. That hard-won lesson goes into your vector DB as a semantic memory. Six months later, working on a completely different project, you type "implement authentication" and Claude recalls that pattern automatically.
Claude-Mem is Better For:
✅ Session continuity after disconnect/restart
✅ Never losing context from previous work in the same project
✅ Automatic memory without thinking about it
✅ Detailed audit trail of all tool usage
✅ Visual exploration via web UI to see what Claude has been doing
✅ Fine-grained privacy - tag specific observations as private
Example use case: You're working on a large feature, but your session crashes. When you reconnect, Claude-mem automatically injects relevant context from your previous work - what files you were editing, what approaches you tried, what worked and what didn't.
Can You Have Both?
Absolutely. In fact, they're complementary.
Here's a powerful workflow:
- Use claude-mem for day-to-day work: Let it automatically capture everything during your coding sessions
- At sprint end, distill patterns: Review your claude-mem observations and extract 2-3 truly universal lessons
- Store those in your manual system: Use the skill-based approach to curate them into your cross-project knowledge base
This gives you:
- Short-term memory (claude-mem): Session persistence, detailed history
- Long-term wisdom (manual curation): Universal patterns that compound across projects
Think of claude-mem as your "working memory" and the manual system as your "long-term memory" - just like human cognition.
Implementation Details
My Manual System Files:
~/.claude/
├── skills/
│ ├── coder-memory-store/SKILL.md
│ └── coder-memory-recall/SKILL.md
├── agents/
│ └── memory-only.md # Specialized agent with only MCP tools
├── memories/
│ ├── backend-patterns/*.md
│ ├── frontend-patterns/*.md
│ └── ai-patterns/*.md
└── hooks/
├── memory_store_reminder.py
└── todowrite_first_call.py
Key insight: The memory-only agent exists because a general-purpose agent kept ignoring instructions and reading hundreds of files. By literally removing file system access and only granting MCP memory tools, we enforce proper separation of concerns.
Claude-Mem Architecture:
claude-mem/
├── Worker service (HTTP API)
├── SQLite + FTS5 (storage)
├── Chroma (vector embeddings)
├── 5 lifecycle hooks
└── Web UI (localhost:37777)
The worker service runs as a separate process, which means even if your Claude session crashes, the memory service keeps running.
My Take
After analyzing both systems, I'm sticking with my manual approach for cross-project pattern learning, but I'm seriously considering adding claude-mem for session continuity.
Why?
-
My curated system has already saved me countless hours by preventing repeated mistakes across different projects. When I start a new FastAPI project, Claude recalls my dependency injection patterns. When I'm debugging race conditions, it remembers the JWT refresh token lesson.
-
But session crashes are painful. There's nothing worse than losing 2 hours of context because your laptop went to sleep or your SSH connection dropped.
-
The combination is powerful. Automatic capture (claude-mem) feeds manual curation (my system). The best of both worlds.
Conclusion
The memory system you choose depends on your workflow:
- Solo developer working on many small projects? Manual curation might be overkill. Use claude-mem.
- Building a long-term knowledge base across large projects? Manual curation pays compound dividends.
- Want both session continuity AND universal patterns? Run both systems.
The future of AI coding assistants isn't just about making them smarter - it's about making them remember in a way that compounds over time. Whether you choose automatic capture, manual curation, or both, having a memory system transforms Claude from a stateless assistant into a true coding partner.
GitHub Repos:
- claude-mem - 14.1k stars
- My setup is documented in my .claude folder
What memory approach do you use with your AI coding assistant? Share your setup in the comments.