Claude Code Masterclass Level 2 · AI Fundamentals All lessons

2.2

Context — Why It Forgets

Time
20 minutes
You'll end up with
A long session you deliberately reset, with the numbers noted

Why this exists

Last lesson: it guesses, and it can't tell you when it's guessing. That's failure mode one.

Here's failure mode two, and you'll have felt this one already. An hour into something that was going well, it starts getting worse. Slower. Vaguer. Forgetting things you told it twenty minutes ago. Repeating itself.

Most people conclude the model is having a bad day and push on through. You met the three commands that fix it back in 1.6 — this is the lesson where you find out what they're actually doing, and when to reach for each one.

The idea

It isn't remembering the conversation. It's re-reading the whole thing, from the start, every single time you send a message.

There's no memory in the way you'd assume. Every time you hit enter, the entire conversation — your first message, its first answer, every correction, every file you pasted — gets sent again, all of it, and it produces the next chunk of text from the lot.

So a two-hour conversation means that on your latest message it re-read two hours of material. To answer "what's the weather." Every time.

Three things follow, and they explain everything you'll notice:

The space it reads is finite. Everything competes for it: the conversation, files you've shared, the tools it's connected to. Connected tools are the sneaky one — they can quietly take a fifth of the space before you've typed anything.

Three commands, and you'll use all three every day:

Command Does Use it when
/context Shows what's filling the space and how much Any time it starts feeling sluggish or dim
/compact Squashes the conversation, keeps the important parts Long session, still need the history
/clear Wipes it. Clean slate New topic. Which is most of the time

The rule that does the work: one task, one session. When you move to something unrelated, clear it. Not because you have to — because the old conversation is now noise competing with your new question.

And it costs you nothing. /clear and opening a fresh window are the same thing. There's no penalty, no lost progress, nothing to feel bad about. The instinct to keep one long conversation going because it "knows you now" is exactly backwards: it doesn't know you, it's re-reading you, and the longer the thing it re-reads the worse it does.

If there's genuinely something worth carrying forward, don't carry the conversation — carry the conclusion. Ask it to summarise what matters, paste that into a fresh session, and you get the value without the weight. Which, as you'll see in Level 3, is most of what a project's files are for.

Do

  1. Find a session you've had going for a while — from the last lesson, or anything real. It needs actual history in it.
  2. Run /context. Write down the total, and the breakdown.
  3. Look at that breakdown properly. How much is your actual conversation, and how much is files and connected tools? Most people are surprised.
  4. Ask it something that needs it to remember detail from early on. Note how sharp the answer is.
  5. Run /compact. Then /context again. Write down the new total.
  6. Ask a similar question. Note whether the answer got better, worse, or the same.
  7. Now /clear, and ask the same question again. It won't know. Sit with that for a second — that's the honest picture of what "memory" is here.
  8. Write it up in context.md: the three numbers, and one line on when you'd use each command.

Step 7 is the one that lands. It's mildly unsettling to watch a whole conversation vanish, and that feeling is what stops you hoarding sessions for a fortnight.

Done when

Never do

Don't keep one session running across days or topics. It's the most common bad habit with these tools and it degrades quietly — no error, no warning, just answers that get gradually worse until you decide the model has got dumber.

If something in an old conversation genuinely matters, take the conclusion, not the conversation. Summarise it, save it to a file, start fresh.