Memory, persistent state across sessions

An agent with no memory starts every conversation from zero. Memory lets the agent remember who you are, what you're working on, and what guidance you've given, across every new session.

How Claude Code's memory works

Claude Code maintains a memory directory per project (scoped to the current user's projects folder). Memory files are plain markdown. An index file (MEMORY.md) lists every memory with a one-line description. Claude reads the index at the start of every conversation.

Memory types

What to save

What NOT to save

Memory hygiene

Risks

When memory shines

Manual memory control

You can tell Claude to remember or forget something explicitly ("remember that I prefer X", "forget what you know about Y"). Claude will update or prune the memory file accordingly.