Lesson 5 / 7 · ~10 minutes
Context: CLAUDE.md
and project memory
Day two's unpleasant surprise: you open a new conversation and Claude remembers nothing from yesterday. It's not a bug. Every session starts with a clean slate. The solution is a file called CLAUDE.md.
CLAUDE.md: a notebook it reads by itself
If a CLAUDE.md file exists in the project folder, Claude Code reads it automatically at the start of every session. It's the note yesterday's session leaves for today's. It should contain:
- What the project is: a sentence or two.
- How it runs and deploys: where to click, what to type.
- Rules: what not to touch, what language to write in.
- Current state: what's done, what's in progress.
And the best part: you don't have to write it yourself. At the end of a session, say: “Write into CLAUDE.md what we did today and what's unfinished.” Claude keeps its own notebook, you just check it now and then.
Long sessions: when to start fresh
A conversation has limited “working memory” (context). When a session gets too long, replies slow down and Claude starts forgetting what happened at the beginning. The golden rule:
Builder: what belongs in CLAUDE.md?
Eight blocks for a fictional café website. Click the four that belong in CLAUDE.md, then evaluate.
Belongs: what the project is and where things live. The first thing a new session needs.
Doesn't belong. Never put passwords in CLAUDE.md (lesson 4). The file travels with the project everywhere.
Belongs: how the project runs and deploys. Exactly what you'd otherwise explain from scratch every day.
Doesn't belong. A diary of experiments takes up space and doesn't help. History lives in git, so keep only the current state and standing decisions in CLAUDE.md.
Belongs: rules and prohibitions. Claude will respect them in every session without reminders.
Doesn't belong. Empty incantations improve nothing. Spend context space on facts about the project.
Belongs: current state and unfinished work. A new session knows exactly where to pick up.
Doesn't belong. Code lives in files and Claude reads it by itself. A copy in CLAUDE.md only goes stale and eats context.
Summary
- CLAUDE.md = project memory. Claude reads it automatically at session start.
- It holds: what the project is, how it runs, rules, current state. Not: passwords, code, diaries.
- Delegate the writing: “write into CLAUDE.md what we did today”.
- Long sessions fade: finish, commit, note, new session.