Claude inject memories automatically in each session, and also retrieves memories whenever needed eg. troubleshooting. But you might wonder where are these memories kept?

The documentation explains well.

Here’s a tldr:

  • Auto memory is per-git-repo, machine-local
  • If not a repo, then keyed by the folder path
  • Default memory stored in ~/.claude/projects/<repo-or-path>/memory/
  • All worktrees/subdirs of same repo share one memory dir
  • Override with autoMemoryDirectory setting
  • Allowed in: user ~/.claude/settings.json, .claude/settings.local.json, managed policy
  • Blocked in: project .claude/settings.json (prevents malicious redirection)

Here’s a trick if you have multiple repos yet they are highly related hence you want a shared memory. You can point their project .claude/settings.local.json to same path! Symlinks also work as an alternative.