[FEATURE] Configurable auto-memory storage location (memoryDirectory setting)

Open 💬 9 comments Opened Feb 24, 2026 by chencheng-li

Summary

Auto-memory is currently stored at a fixed path:
~/.claude/projects/<encoded-git-root>/memory/

There is no way to configure this location. I'd like a memoryDirectory
setting in settings.json to allow custom storage paths.

Use Cases

1. Cross-machine sync via git
When working across multiple machines (e.g. MacBook + Mac Mini via SSH),
auto-memory is siloed per machine. There's no way to sync it except manual
rsync. If memory could be stored inside the repo (e.g. .claude/memory/),
it would sync automatically via git pull.

2. Team-shared memory
Teams may want to share certain project learnings (architecture decisions,
recurring debugging patterns) across all developers. Currently this requires
duplicating content into CLAUDE.md. A repo-local memory option would allow
team-scoped memory distinct from global CLAUDE.md instructions.

3. Backup and portability
The current location in ~/.claude/ is easy to lose on machine wipe/reset.
Storing memory in the repo makes it part of normal backup workflows.

Proposed API

In settings.json:

{
  "memoryDirectory": ".claude/memory"
}
  • Relative path → resolved from git repo root
  • Absolute path → used as-is
  • Unset → current behavior (~/.claude/projects/<project>/memory/)

Notes

  • Repo-local memory should probably be .gitignored by default

(to avoid accidental commits), with an opt-in flag like
"memoryDirectoryTracked": true to commit it

  • This is complementary to CLAUDE.md (instructions) — memory is

Claude's own scratchpad, not user rules

  • Current workaround: manually rsync ~/.claude/projects/*/memory/

between machines

View original on GitHub ↗

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