# Auto Memory

> Notes Claude writes for itself, loaded again at the next session.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** Claude Code auto memory, MEMORY.md, /memory

## Think of it like

It is like a diary a helper keeps. It reminds them what you like.

## Definition

Auto memory is the notes Claude writes for itself as it works with you. It saves things like your preferences, corrections you gave and facts about the project that the code does not show. The notes live in a folder for each repository under ~/.claude/projects/. An index file named MEMORY.md is loaded at the start of each session, up to its first 200 lines or 25 KB. You write CLAUDE.md. Claude writes auto memory.

## Example

Jack tells Claude twice not to change the lock file. Claude saves a note, and the next day it leaves the lock file alone without being told.

## Example code

```console
/memory
```

Open your memory files, or turn this on or off.

## Why it matters

Claude gets better at working with you, and you do not have to write each lesson down.

## Common mistake

Never reading what it saved. Open /memory now and then, and delete notes that are wrong or out of date.

## Three principles

- **Written by Claude.** Not by you.
- **Per repository.** Under ~/.claude/projects/.
- **Index loads.** First 200 lines.

## Related terms

- [Agent Memory](https://learn.benibix.com/term/ai/agent-memory)
- [CLAUDE.md](https://learn.benibix.com/term/ai/claude-md)
- [Claude Code Session](https://learn.benibix.com/term/ai/claude-code-session)
- [Auto-Compact](https://learn.benibix.com/term/ai/auto-compact)

## Told apart from

- [CLAUDE.md vs Auto Memory](https://learn.benibix.com/compare/claude-md-vs-auto-memory): People often think auto memory and CLAUDE.md are the same file. Both reach Claude at the start of a session, but different people write them. You write CLAUDE.md, and your team can share it in git. Claude writes auto memory for itself, from what it learns while working with you. It lives in your home folder, so it is never shared.

## Taught in

- [CLAUDE.md and Auto Memory](https://learn.benibix.com/learn/ai-claude-code/claude-md-and-auto-memory): Claude Code, 7/16

![You write CLAUDE.md. Claude writes its own memory notes, and the index loads at the next start.](https://learn.benibix.com/diagrams/cc-auto-memory.svg)

---

Source: https://learn.benibix.com/term/ai/auto-memory
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
