Memory is Claude Code's mechanism for remembering project conventions, preferences, and context between sessions. Instead of re-explaining your codebase every time, you write durable instructions into CLAUDE.md files that Claude Code discovers and loads automatically at startup, folding them into its context window.
Memory exists at several scopes: project memory (a CLAUDE.md in the repo, shared with your team via source control), user memory (a personal ~/.claude/CLAUDE.md that applies across all your projects), and enterprise-managed policy memory. Claude Code also recurses up from your working directory and picks up CLAUDE.md files nested in subdirectories. Memory files can pull in others with @path import syntax, so you can keep instructions modular.
In practice you manage memory two ways: prefix a message with # to quickly append a new instruction (you choose which file it lands in), or run the /memory slash command to open and edit your memory files in your editor. For exact file locations, scope precedence, and import rules, see the official Claude Code docs.
Why it matters
Memory is the difference between a tool that forgets and a teammate that learns your project; a well-written CLAUDE.md encodes your conventions, commands, and gotchas once so every future session starts already knowing them, producing more consistent results with far less repeated prompting.
Related terms
See Memory in action across releases — browse the Claude Code changelog.
Get release alerts