Claude forgets your project. Give it a memory file.
Every time you start a new session, Claude starts from zero. It does not know your channel, your tone or the rules you gave it yesterday. Two built-in fixes solve this: a text file called CLAUDE.md that you write once, and automatic notes that Claude takes on its own. This guide shows how to write a short starter file, how to check that Claude reads it, and what it costs.
- session: one conversation with Claude Code, from when you start it until you close it.
- token: the unit Claude counts its working memory in, roughly three quarters of a word.
- prompt: the message you send to the AI.
- terminal: a window where you type commands instead of clicking, such as PowerShell on Windows.
- Working memory: how much Claude can hold in one conversation. The command /context measures it in tokens.
- Memory file: the CLAUDE.md file you write. Claude reads it at the start of every session.
- Automatic notes: files Claude writes for itself about you and your project. It reads them again in later sessions.
- Claude Code installed and signed in. If you do not have it yet, follow Install Claude Code on Windows first.
- A folder for your project, for example one for your channel.
- Notepad, or any plain text editor.
Why Claude forgets
A session ends when you close it, and Claude keeps nothing from it by itself. Two things carry over: your memory file and the automatic notes. Both load at the start of every session, and Claude follows them from the first message.
1. Write the file
Create a plain text file called exactly CLAUDE.md in your project folder, the one you open Claude Code in. Notepad likes to save it as CLAUDE.md.txt, which Claude does not read. In the Save window choose "All files" as the type, or turn on "File name extensions" in File Explorer to check the name.
Here is a starter for a content channel. Make every rule concrete: "Keep video titles under 50 characters" works better than "write good titles".
Put in facts Claude should know in every session: who you write for, your tone, your standing rules. Add a line whenever you catch yourself typing the same correction a second time.
2. Check that it loads
Open Claude Code in that folder and type this in the message box.
Type this inside Claude Code, in the message box
> /context
You can also ask a question that only the file can answer. Type this in PowerShell, in the folder where the file lives.
Type this in PowerShell
$ claude -p "What is the name of the channel and what is it about?"
Before and after
The same questions in two empty folders, one with a short memory file and one without.
| Test | Without the file | With the file |
|---|---|---|
| Asked: "What is the name of the channel and what is it about?" | "I do not have enough context to say which channel you mean." | "The channel is called Green Thumb Weekly, and it is about gardening for beginners." |
| Asked for a video intro, 3 runs each: length | 7 to 11 sentences, with staging notes | 2 sentences, every time |
| Same 3 runs: channel name in the intro | 0 of 3 | 3 of 3 |
Rules show best when they ask for something specific that Claude would not do on its own. With the rule "Always end every answer with the exact line: Happy growing!", Claude added that line every time, which is an easy way to see that the file works.
What the file costs
The file is sent at the start of every session, so every line uses some of Claude's working memory every time, whether the line is useful or not. Keep it under 200 lines. A 200-line file takes about 6k tokens before you type a word.
| File | Size | Shown in /context as |
|---|---|---|
| 4 short lines | 246 bytes | 97 tokens |
| 50 lines | 4 KB | 1.4k tokens |
| 200 lines | 18 KB | 6k tokens |
| 600 lines | 56 KB | 17.9k tokens |
| 2,000 lines | 188 KB | 61.1k tokens |
| A file named CLAUDE.md.txt | 246 bytes | not listed until you rename it to CLAUDE.md |
The rule of thumb: start with the 6 or 7 rules you repeat most, and add a line only when you catch yourself repeating a correction.
Automatic notes
This is the second fix, and it needs nothing from you. As you work, Claude saves notes for itself about your preferences and corrections, and it reads them in later sessions. It is on by default. Type /memory inside Claude Code to open the notes folder or switch it off.
Try it. In an empty folder, tell Claude: "Remember that my channel is about balcony gardening, I post on Tuesdays and Fridays, and I always want video titles under 50 characters." Then start a brand new session and ask when you post.
The notes are plain text on your PC. You can read, edit and delete them, and they do not follow you to another computer. Use the memory file for rules you want exactly as you wrote them, and let the automatic notes collect the small things Claude learns from your corrections.
If something looks off
Claude does not seem to know my file
Check the name first. It must be exactly CLAUDE.md, not CLAUDE.md.txt. Then check that you started Claude Code in that folder or in a folder below it, and type /context to see whether the file is listed under Memory files.
Some rules show up more than others
Concrete rules show up most. Rewrite "write nicely" as something you could check, like "keep titles under 50 characters", and make sure no two lines say opposite things.
I told Claude something and want it to remember it
Ask Claude to "add this to CLAUDE.md", or type /memory and look at what the automatic notes saved.
How to get the best result
- Start with 6 or 7 concrete rules. Add a line whenever you catch yourself repeating a correction, and delete lines that no longer matter.
- Write rules you can check. "Keep video titles under 50 characters" gives the same result every time.
- Keep the file under 200 lines. A short file leaves more working memory for your real task.
- Check it with /context after you change it, so you know Claude sees the new version.
- Long chat? When you shrink it with /compact, Claude reads the file again, so your rules stay. The commands guide shows /compact in action.
Want more ways to get the most out of Claude Code? Follow my content and check my other posts.
Get the next guide when it is ready.
One email a week at most, and you can leave whenever you like.