Feature Request: Allow project-scoped memory to be stored inside the repository for cross-device sync

Resolved 💬 5 comments Opened Mar 25, 2026 by koreamanse Closed May 23, 2026

Problem

Claude Code's memory system (~/.claude/projects/.../memory/) is stored in the user's home directory, making it local to a single machine. When users work across multiple devices, all accumulated memory — feedback corrections, workflow preferences, learned patterns — is lost on each new machine.

The current workaround is to put everything into CLAUDE.md, but this conflates two different concerns:

  • Project rules (architecture decisions, coding conventions) — relevant to all contributors
  • Personal interaction feedback ("don't summarize after every response", "always search recursively before saying a file doesn't exist") — relevant to how Claude works with me

Manual migration is also impractical

The memory directory name is derived from the absolute path of the working directory. For example:

  • Machine A: C:\Projects\my-app~/.claude/projects/c--Projects-my-app/memory/
  • Machine B: D:\dev\my-app~/.claude/projects/d--dev-my-app/memory/

Even if you manually copy the memory files, Claude won't recognize them because the directory name doesn't match. For it to work, you would need:

  1. The exact same absolute project path on both machines
  2. The exact same OS username (since ~ resolves differently)

This makes it virtually impossible to transfer memory between machines, even manually.

Why this matters more than it seems

1. Memory is Claude Code's compounding advantage — but only if it persists.

The whole point of memory is that Claude learns from mistakes and gets better over time. If a user corrects Claude on Machine A, that correction should apply on Machine B. Otherwise, the user has to re-teach the same lessons, which is exactly the frustration memory was designed to eliminate.

2. Multi-device development is not an edge case.

It's easy to assume developers work on a single machine, but consider:

  • Home + office setups — many developers use a desktop at work and a laptop at home
  • Team environments — shared workstations, pairing stations, conference room machines
  • OS reinstalls / new machines — all memory is silently lost
  • Cloud dev environments — Codespaces, remote SSH, ephemeral containers

3. The workaround degrades both use cases.

Forcing everything into CLAUDE.md means:

  • Project-level CLAUDE.md gets bloated with personal preferences that other contributors don't need
  • Personal feedback sits next to architectural docs
  • Users must manually migrate rules between memory and CLAUDE.md, which is error-prone

Proposed solution

Allow memory files to optionally live inside the project repository, e.g.:

.claude/memory/
├── MEMORY.md          # index
├── feedback_search.md
├── user_preferences.md
└── ...

This is the same format as today's memory — just stored in .claude/ within the repo instead of ~/.claude/projects/. Since .claude/ is already a recognized project-level directory, this would be a natural extension.

Benefits:

  • Memory syncs via Git — works across any machine that clones the repo
  • Users can .gitignore it if they don't want it committed
  • No changes needed to memory file format
  • Backward compatible — existing ~/.claude/ memory continues to work

View original on GitHub ↗

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