Use repo name or git remote instead of filesystem path for project memory directory names

Resolved 💬 3 comments Opened Apr 7, 2026 by paul5007 Closed Apr 11, 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:

  1. Readability — the directory name is an ugly, hard-to-parse slug derived from the local path
  2. 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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗