Skip to content

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

@chencheng-li

Description

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsenhancementNew feature or requestmemory

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions