6 min · +80 XP
Tokens, context and why it forgets
Two ideas that explain much of the AI's odd behaviour.
By the end of this lesson
You will be able to explain why the AI forgets and how to give it the context it needs.
Two ideas explain much of what confuses people about AI: tokens and the context window. Once you know them, its forgetfulness stops being a surprise.
Tokens
The model does not read letter by letter. It reads text in pieces called tokens, which are whole words or parts of words. Usage and plan limits are counted in tokens, and this is also why a model can miscount the letters in a word.
The context window
The context window is everything the model can see at one moment: your messages, its replies, the files it has read and the output of commands it ran. It has a fixed size. Anything outside it does not exist for the model.
Think of the context window as a desk. The model works only with the papers that are on the desk right now. A new conversation starts with a clean desk.
That is why it forgets. A new session does not see yesterday's conversation. In a long session Claude Code summarises older parts to make room, and small details from the beginning can be lost.
A request with context gets better work: what you want, who it is for, an example, and what "done" looks like. Add what is relevant, not everything you have, because the desk has a limit.
In Claude Code your project folder works as a kind of memory: the files stay on disk, and Claude reads them again in each session. A special file called CLAUDE.md holds standing instructions that Claude reads at the start of every session, and Claude can also keep short notes of its own (auto memory). You will set both up later in the course.
Run /context to see what is filling the window. Use /clear between unrelated tasks and /compact with a focus (for example, /compact focus on the API changes) in long ones. Put rules that must survive compaction into CLAUDE.md rather than early chat messages.
Yesterday you spent an hour discussing details with Claude. Today, in a new session, it does not remember that conversation. Why?
Which request will most likely get a better result?
Facts checked against the official Claude Code docs October 24, 2026 · source

Author
Evgenii Arsentev
PhD · Founder & CEO, Dad4Kids