Claude Code Basics Lesson 29 of 46
Automatic Memory
- Besides your instructions, Claude takes its own notes on what it learns working with you.
- It's on by default: when it saves or rereads something, it tells you.
- They're your own text files: readable, editable, deletable with /memory.
- Every session it only loads the index: it goes and gets the rest if it needs it.
Two memories, not one
CLAUDE.md is the memory you write: rules, conventions, how things are done here. Next to it there's a second one, which it writes.
While you work together, Claude notes down what it discovers: that a certain command needs to be run a certain way, that you prefer a certain form, that something that looked simple has a hidden complication. It doesn't save everything: it decides what's worth remembering for next time.
The difference in one line: you write the rules, it notes down what it learns. They don't replace each other, they add up.
How you notice it
It doesn't work behind your back: when it saves or rereads a note, it tells you, with a line like "memories saved" or "memories recalled." That's the moment worth raising an eyebrow and going to see what it wrote.
The notes live in a folder per project, on your computer. They don't travel around and they don't end up in the working folder you share with others.
Always the index, detail on demand
There's an elegant detail here worth noticing, because it's the solution to the same problem we've been talking about for three lessons now. If it loaded every note on every startup, the table would be full before it even started.
So it doesn't: every session it's only shown a short index, and it goes and gets the detailed notes only when it needs them. Always the index, the chapter on demand — keep that in mind, because it's the same mechanism as skills in the next chapter.
Reading it, fixing it, turning it off
The command is /memory: from there you see the memory files and your instructions, open them, edit them. From there you can also turn off automatic memory, if you'd rather it didn't take notes.
And it's worth checking in on now and then, for a practical reason: it might have gotten something wrong. Something you said once for a one-off case can turn into a rule in its head. They're plain text files: readable and deletable in ten seconds.
The reverse is also true: if you tell it "remember, from now on we do it this way," it jots that down. It's the easiest way to teach it something without opening a single file.
What's next
The bucket is almost full: permanent instructions, workspace, cleanup, automatic notes. In the next lesson we put them all together, looking at the same job done three times: the first time explaining everything, the second with the instructions written down, the third with memory working for you.
Did you get it?
Two minutes, no grade. Trying to answer — even getting it wrong — cements the concepts far more than rereading. Not in the mood? Skip it: the lesson still counts as complete.
What's the difference between CLAUDE.md and automatic memory?
Two complementary systems, and neither replaces the other. You write the rules; it jots down what it discovers while working — your corrections, your habits, the details it had to figure out on its own.
You notice it jotted down something wrong. What do you do?
They're your own text files, which you can read and edit. `/memory` is the front door — and it's worth checking in on now and then, because a wrong note follows you into every future session.
How much of automatic memory gets loaded every session?
If it loaded everything, we'd be back to the full-table problem. Only a short index gets put in front of it; it goes and grabs the detailed notes only when it needs them. It's the same principle as skills, which we'll see in the next chapter.
-
Chapter 1 Introduction
-
Chapter 2 What's Underneath
-
Chapter 3 You Choose the Engine
-
Chapter 4 First Time at the Controls
-
Chapter 5 What You Let It Touch
-
Chapter 6 What It Knows About You
-
Chapter 7 Skills
-
Chapter 8 How Many You Put to Work
-
Chapter 9 What It's Connected To
-
Chapter 10 Automating the Setup
-
Chapter 11 Wrap-Up