Use repo name or git remote instead of filesystem path for project memory directory names
Resolved 💬 2 comments Opened Apr 7, 2026 by paul5007 Closed Apr 7, 2026
Problem
The auto-memory system stores project memories in ~/.claude/projects/<path>/memory/, where <path> is the absolute filesystem path with / replaced by -. For example:
~/.claude/projects/-home-username-projects-my-app/memory/
This has two issues:
- Readability — the directory name is an ugly, hard-to-parse slug derived from the local path
- Portability — moving the repo to a different directory (or cloning on another machine at a different path) creates a completely separate memory store, losing all accumulated context
Suggested Improvement
Use the git remote URL or repository name as the project identifier instead of the filesystem path. For example:
# Current
~/.claude/projects/-home-username-projects-my-app/memory/
# Better options
~/.claude/projects/my-app/memory/
~/.claude/projects/github.com-org-my-app/memory/
This would:
- Be human-readable when browsing
~/.claude/projects/ - Survive repo moves and re-clones
- Match the same repo across different machines (if memories are synced)
For non-git directories, falling back to the current path-based scheme is fine.
🤖 Generated with Claude Code
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗