Tags: claude code ai
Claude Code is my de facto AI coding tool. But it has one fundamental limitation: it forgets everything when you restart it. Every session starts fresh, forcing you to re-establish context, re-explain architectural decisions, and watch Claude re-analyze the same files repeatedly.
The traditional workaround is CLAUDE.md—a markdown file where you inject instructions and context. This helps, but it's manual and limited.
You can create ~/CLAUDE.md (or project-specific .claude/CLAUDE.md) with instructions like:
# Project Guidelines
- Follow reactive functional paradigm in Java
- Use repository pattern for data access
- Write tests for all business logic
- API responses must follow RFC 7807 for error handling
Claude reads this at session start. It's useful for coding standards and preferences, but it misses the dynamic aspects of your project:
What files you edited yesterday and why
What files you edited yesterday and why
What bugs you already fixed and how
Architectural decisions you made during implementation
Context from previous conversations about specific features
Tool usage patterns and command outputs
CLAUDE.md is static. Your project evolves. You need memory that evolves with it.
Claude-Mem is a plugin that automatically captures everything Claude does during your coding sessions and makes that knowledge available to future sessions.
Your questions and requests
The problems you're trying to solve
File reads, writes, and edits
Shell command executions and their outputs
Search queries and results
API calls and responses
Install directly from the Claude Code plugin marketplace:
Restart Claude Code.
Verify the worker service is running:
If the worker isn't running, start it manually:
The worker service provides a web UI at http://localhost:37777 where you can browse your session history, search observations, and view the timeline.
All data is stored in ` ~/.claude-mem/`
~/.claude-mem/
├── claude-mem.db # SQLite database
├── logs/ # Worker service logs
├── settings.json # Configuration
└── chroma/ # Vector embeddings
Override the lcoation if you need
Wrap sensitive content in **
<private>
API_KEY=sk-super-secret-key-12345
DATABASE_PASSWORD=P@ssw0rd!
</private>
When you run /clear in Claude Code, you might expect it to wipe memory. It doesn't.
What /clear does:
Clears the current conversation context
Re-injects fresh observations from Claude-Mem
Continues tracking the same session
You get a clean slate in the conversation without losing project memory. This is useful when context gets cluttered or you want to shift focus.
Claude-Mem uses SQLite under the hood. You can query it directly:
example queries
This plugin feels like a muscle memory for your claude code. Install it. Forget about it. Let Claude remember.