---
title: "Does Claude Code have memory across sessions?"
description: "Claude Code remembers through CLAUDE.md instructions and local auto memory; MEMORY.md loads a limited index at startup, with detailed notes read as needed."
image: "https://bombos.ai/assets/og-en-v2.png"
---

# Does Claude Code have memory across sessions?

Short answer

You can resume an earlier session with claude --continue or claude --resume; a new session starts with an empty context window. Two mechanisms carry knowledge into it: CLAUDE.md files, which you write and can share through git, and auto memory, notes Claude Code writes itself in ~/.claude/projects/<project>/memory/ with MEMORY.md as the index. Auto memory is on by default and stays on your machine.

*Piet Baudoin · published November 16, 2026 · November 16, 2026*

## Two mechanisms, two authors

You can pick a conversation back up with `claude --continue` (the latest) or `claude --resume` (choose from earlier ones). A new session, though, begins with an empty context window. What carries over is whatever gets loaded at the start, and the docs name two sources for that.

| Aspect | CLAUDE.md | Auto memory |
| --- | --- | --- |
| Who writes it | You and your team | Claude Code itself |
| What goes in | Instructions, conventions, commands, architecture | What Claude learned while working: your preferences, corrections, project facts, pointers |
| Where it lives | Repo, home folder or a managed system path | `~/.claude/projects/<project>/memory/` |
| What loads | The whole file, every session | The first 200 lines or 25KB of `MEMORY.md` |
| Shared with the team | Yes, the project file through git | No, it stays on your machine |
| Default | You create it | On in local sessions |

## CLAUDE.md: the memory you write

CLAUDE.md can sit in four places. Claude Code loads the files in the working directory and every directory above it at startup, joined from the root down. Files in subdirectories load when Claude works there.

1.  **Managed policy**: a system path set by IT, for example `/etc/claude-code/CLAUDE.md` on Linux or `%ProgramFiles%\ClaudeCode\CLAUDE.md` on Windows.
2.  **User**: `~/.claude/CLAUDE.md`, your personal rules for every project.
3.  **Project**: `./CLAUDE.md` or `./.claude/CLAUDE.md`, committed to git and shared with the team.
4.  **Local**: `./CLAUDE.local.md`, for personal project instructions; add it to `.gitignore` yourself.

You can import other files with `@path/to/file`, up to four levels deep, and split topics into `.claude/rules/*.md`, optionally scoped with `paths` so a rule only loads for matching files. Keep each file under 200 lines.

## Auto memory: the memory Claude writes

Auto memory is on by default. While you work, Claude Code saves notes of four kinds: `user`, `feedback`, `project` and `reference`. It skips what already follows from the code or from CLAUDE.md. Each note is its own file, and `MEMORY.md` is the index. At the next session start, the index loads and the notes are read when they matter.

You manage it with `/memory`. That command also holds the switch to turn it off, which writes `autoMemoryEnabled` to your settings. You can move the folder with `autoMemoryDirectory`.

## The misunderstanding: memory is not enforcement

Both mechanisms are context. Claude reads them and usually follows them, but nothing forces it to. The docs say it plainly: to block an action, use a PreToolUse hook. If “never push to main” matters, a hook that exits with code 2 stops the push; a line in CLAUDE.md only asks. See [Claude Code hooks](https://bombos.ai/en/questions/claude-code/claude-code-hooks/).

The second misunderstanding is that auto memory follows you. It is machine-local. It is not shared between machines or cloud environments, so a session on claude.ai/code or a colleague’s laptop starts without it.

## What this means for a team

What a team shares out of the box is instructions: the project CLAUDE.md, AGENTS.md and `.claude/rules/` in git, and a managed CLAUDE.md from IT. They are only as good as the last person who edited them. Auto memory is where most of the learning happens, corrections and preferences picked up during real work, and that learning stays with one developer. When a teammate corrects Claude on the same thing a week later, their agent learns it again from zero. And when someone switches to Cursor, Copilot or ChatGPT for a task, none of it comes along. How to get the most out of what Claude Code does share is in [how to share Claude Code context with your team](https://bombos.ai/en/knowledge-base/claude-code-memory-for-teams/).

## Where Bombos fits

Bombos is a plugin that adds a shared memory under Claude Code and the other AI tools a team uses. What one developer’s agent learns, a rule the team agreed on, or a decision buried in mail or a repo, becomes available to every agent, with a trail showing what an answer rests on. It runs in the cloud or on your own server, and one developer can try it on their own agents first.

## Related questions

Where is Claude Code's auto memory stored?

In ~/.claude/projects/<project>/memory/ on your own machine. MEMORY.md is the index, with one file per memory next to it. All worktrees of the same git repo share one folder.

How do I turn auto memory off?

Use the toggle in /memory, set autoMemoryEnabled to false in a project's settings, or set the environment variable CLAUDE\_CODE\_DISABLE\_AUTO\_MEMORY=1.

Does Claude Code read AGENTS.md?

By default, AGENTS.md loads when no CLAUDE.md or CLAUDE.local.md takes precedence. You can enable both formats in /config, or import it from CLAUDE.md with @AGENTS.md.

How long should CLAUDE.md be?

The docs advise under 200 lines per file. It loads into every session, so every line costs context and tokens. Split topics into .claude/rules/ files instead.

Is MEMORY.md loaded in full?

No. At session start Claude Code loads the first 200 lines or 25KB of MEMORY.md. The separate memory files are read when they are needed.

## Sources

1.  [Claude Code docs: How Claude remembers your project](https://code.claude.com/docs/en/memory)
2.  [Claude Code docs: Manage costs effectively](https://code.claude.com/docs/en/costs)
3.  [Claude Code docs: Hooks reference](https://code.claude.com/docs/en/hooks)
4.  [Claude Code docs: Manage sessions](https://code.claude.com/docs/en/sessions)

## What does your AI forget?

1.  01You tell us which AI you use and where it keeps starting over.
2.  02We show what a shared memory changes there, on your own examples.
3.  03You keep the plan, with or without Bombos.

![Piet Baudoin](https://bombos.ai/assets/team/piet-klein.jpg)

**Piet Baudoin**You talk to Piet, from the Bombos teamDutch team from Utrecht and Nijmegen · data in Europe

## More questions about Claude Code

-   [How do Claude Code plugins work, and can a plugin add shared memory?](https://bombos.ai/en/questions/claude-code/claude-code-plugins-memory/)
-   [What are Claude Code hooks and how do I set them up?](https://bombos.ai/en/questions/claude-code/claude-code-hooks/)
-   [How do I use Claude Code in VS Code and JetBrains?](https://bombos.ai/en/questions/claude-code/claude-code-in-vs-code-and-jetbrains/)
-   [What is Claude Code Remote Control and how do I use it?](https://bombos.ai/en/questions/claude-code/claude-code-remote-control/)
-   [What is the Claude Code SDK, now the Claude Agent SDK?](https://bombos.ai/en/questions/claude-code/claude-code-sdk/)
-   [What does plan mode do in Claude Code and how do you turn it on?](https://bombos.ai/en/questions/claude-code/claude-code-plan-mode/)
-   [How much does Claude Code cost, and which plan do I need?](https://bombos.ai/en/questions/claude-code/claude-code-pricing/)
-   [Can Claude Code review pull requests, and what does Code Review cost?](https://bombos.ai/en/questions/claude-code/claude-code-review/)

[All questions about Claude Code →](https://bombos.ai/en/questions/claude-code/)


---

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","url":"https://bombos.ai/","logo":"https://bombos.ai/assets/bombos-bee.png","description":"Bombos is the memory layer under every AI your team uses. One shared memory for Claude, ChatGPT, Copilot, Cursor and your own agents, that learns how you work.","sameAs":["https://www.linkedin.com/company/bombos-ai","https://www.youtube.com/@truebombos","https://www.instagram.com/truebombos/","https://bsky.app/profile/bombostrue.bsky.social","https://www.threads.com/@truebombos","https://mastodon.social/@Bombos","https://www.tiktok.com/@truebombos","https://t.me/truebombos","https://www.pinterest.com/truebombos/","https://github.com/bombos-ai","https://linktr.ee/bombos.ai","https://bombosai.substack.com","https://hashnode.com/@bombosai","https://hackernoon.com/u/bombos","https://dev.to/bombos"],"email":"info@bombos.ai","areaServed":["NL","Europe"],"knowsLanguage":["nl","en"],"contactPoint":{"@type":"ContactPoint","email":"info@bombos.ai","contactType":"sales","url":"https://bombos.ai/en/contact/","availableLanguage":["nl","en"]}},{"@type":"WebSite","@id":"https://bombos.ai/#website","name":"Bombos","url":"https://bombos.ai/","inLanguage":["nl-NL","en"],"publisher":{"@id":"https://bombos.ai/#organization"}}]}

{"@context":"https://schema.org","@type":"Article","headline":"Does Claude Code have memory across sessions?","description":"Claude Code remembers through CLAUDE.md instructions and local auto memory; MEMORY.md loads a limited index at startup, with detailed notes read as needed.","abstract":"You can resume an earlier session with claude --continue or claude --resume; a new session starts with an empty context window. Two mechanisms carry knowledge into it: CLAUDE.md files, which you write and can share through git, and auto memory, notes Claude Code writes itself in ~/.claude/projects/<project>/memory/ with MEMORY.md as the index. Auto memory is on by default and stays on your machine.","datePublished":"2026-11-16T00:00:00.000Z","dateModified":"2026-11-16T00:00:00.000Z","author":{"@type":"Person","name":"Piet Baudoin"},"publisher":{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","logo":{"@type":"ImageObject","url":"https://bombos.ai/assets/bombos-bee.png"}},"image":"https://bombos.ai/assets/og-en-v2.png","mainEntityOfPage":"https://bombos.ai/en/questions/claude-code/claude-code-memory/","inLanguage":"en-US","isPartOf":{"@type":"CollectionPage","name":"Claude Code","url":"https://bombos.ai/en/questions/claude-code/"},"citation":[{"@type":"CreativeWork","name":"Claude Code docs: How Claude remembers your project","url":"https://code.claude.com/docs/en/memory"},{"@type":"CreativeWork","name":"Claude Code docs: Manage costs effectively","url":"https://code.claude.com/docs/en/costs"},{"@type":"CreativeWork","name":"Claude Code docs: Hooks reference","url":"https://code.claude.com/docs/en/hooks"},{"@type":"CreativeWork","name":"Claude Code docs: Manage sessions","url":"https://code.claude.com/docs/en/sessions"}]}

{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Bombos","item":"https://bombos.ai/en/"},{"@type":"ListItem","position":2,"name":"Questions","item":"https://bombos.ai/en/questions/"},{"@type":"ListItem","position":3,"name":"Claude Code","item":"https://bombos.ai/en/questions/claude-code/"},{"@type":"ListItem","position":4,"name":"Does Claude Code have memory across sessions?","item":"https://bombos.ai/en/questions/claude-code/claude-code-memory/"}]}

{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Where is Claude Code's auto memory stored?","acceptedAnswer":{"@type":"Answer","text":"In ~/.claude/projects/<project>/memory/ on your own machine. MEMORY.md is the index, with one file per memory next to it. All worktrees of the same git repo share one folder."}},{"@type":"Question","name":"How do I turn auto memory off?","acceptedAnswer":{"@type":"Answer","text":"Use the toggle in /memory, set autoMemoryEnabled to false in a project's settings, or set the environment variable CLAUDE_CODE_DISABLE_AUTO_MEMORY=1."}},{"@type":"Question","name":"Does Claude Code read AGENTS.md?","acceptedAnswer":{"@type":"Answer","text":"By default, AGENTS.md loads when no CLAUDE.md or CLAUDE.local.md takes precedence. You can enable both formats in /config, or import it from CLAUDE.md with @AGENTS.md."}},{"@type":"Question","name":"How long should CLAUDE.md be?","acceptedAnswer":{"@type":"Answer","text":"The docs advise under 200 lines per file. It loads into every session, so every line costs context and tokens. Split topics into .claude/rules/ files instead."}},{"@type":"Question","name":"Is MEMORY.md loaded in full?","acceptedAnswer":{"@type":"Answer","text":"No. At session start Claude Code loads the first 200 lines or 25KB of MEMORY.md. The separate memory files are read when they are needed."}}]}
```
