Auto-memory writes project-specific data to ~/.claude (global config dir)
Resolved 💬 3 comments Opened Mar 23, 2026 by ben-at-felicis Closed Mar 23, 2026
Problem
Claude Code's auto-memory system writes project-specific memory files to ~/.claude/projects/<path>/memory/. This is a categorization mistake:
~/.claude/is the user's global Claude configuration directory (settings, keybindings, etc.)- Project-specific data should live in the repo (e.g.
.claude/LEARNINGS.md), not in a global directory
Why this matters
- Project data doesn't belong in global config. If I delete
~/.claude/to reset Claude settings, I lose all project memories. If I back up a repo, the memories aren't included.
- Repos already have a
.claude/directory for project-specific Claude configuration (CLAUDE.md,LEARNINGS.md,settings.local.json). Memory files should go there too — they're project context, not global user config.
- The path encoding is fragile.
~/.claude/projects/-Users-benmathes-coding-felicis-exoskeleton-exo2/is derived from the filesystem path. Moving or renaming the repo breaks the association.
- It's not version-controlled. Project-specific learnings belong in the repo where they can be shared with team members and persisted across machines.
Suggested fix
Either:
- Write project memories to
.claude/memory/inside the repo (alongsideCLAUDE.md) - Or respect the existing
LEARNINGS.mdconvention and don't maintain a parallel memory system
The key principle: global user config in ~/.claude/, project-specific data in the repo's .claude/.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗