Store per-project memory and settings inside the project directory
Problem
Per-project memory lives in ~/.claude/projects/<path-mangled>/memory/. It is already
scoped to a project — the directory name is the project path — but it is stored in the
user profile.
Anyone working on the same project from more than one machine (shared repo, Dropbox,
work/home laptops) loses it: the project syncs, its memory does not.
The current workaround is to manually copy the memory files into a folder inside the
project and maintain a hand-written "state" file summarizing what the assistant should
know. It is fragile and easy to forget.
Session state already travels. /resume carries a terminal session into the Claude Code
desktop app with the full conversation and context intact. Memory is the other half of
that state, and it does not move at all.
Proposal
An option to keep per-project memory and settings in <project>/.claude/, the same way.claude/settings.json and CLAUDE.md already live there. Syncing then happens
automatically via git or any file-sync tool, with no extra configuration.
Related
Same underlying problem, user-level config:
- #81392 — separating portable config from machine-local state under
~/.claude, so it
can be versioned as dotfiles
CLAUDE_CONFIG_DIR would be the existing escape hatch, but it is not reliable:
- #81278 —
CLAUDE_CONFIG_DIRnot honored (data separation) - #88528 — does not redirect user memory;
~/.claude/CLAUDE.mdis still loaded - #88603 — session rename writes to
~/.claude, ignoring$CLAUDE_CONFIG_DIR - #88374 —
install.shstill creates~/.claude/downloads
Even with those fixed, CLAUDE_CONFIG_DIR moves the whole profile for every project at
once, which is a different thing from letting a project carry its own memory.