Claude Code Memory System
Claude Code has 4 levels of persistent memory: project CLAUDE.md (repo root), subdirectory CLAUDE.md (local overrides), user CLAUDE.md (~/.claude/), and auto-memory (markdown files written by Claude in a memory/ folder). Each level overrides the previous.
Strengths
- 4 granularity levels: global → project → subdirectory → auto-memory
- Auto-memory: Claude writes its own persistent notes between sessions
- Committable CLAUDE.md, project rules propagate to the whole team via the repo
Limitations
- Overloaded CLAUDE.md → context window wasted every session
- Auto-memory can go stale if Claude isn't invited to clean it up regularly
Best for
- Long-term projects where Claude needs to know conventions and architecture without reminders
- Multi-dev teams wanting to share Claude rules via the repo (committed CLAUDE.md)