Context windows and tokens in long AI chats

Day 3, 25 minutes · beginner

Goal of this lessonSpot when a long chat starts losing early details, and carry your work into a fresh chat with a short handover summary.

Why it matters

You have probably seen it: a chat that started well gets worse after an hour. The tool forgets a rule you gave it at the start, mixes up two versions of a document, or repeats a mistake you already corrected. That is not the tool getting tired. It is running into the limit of what it can see at once.

That limit is called the context window, and it is measured in tokens. Once you understand both, you know when a long chat is still fine, when it is quietly losing track, and when to start over without losing your work.

Today you test this on a chat of your own and then write a short handover summary: the few lines that carry a piece of work from a tired old chat into a fresh new one. At the end you have that summary, tried and corrected, ready to reuse.

What the tool can see

The context window is everything the model can look at while it writes its next answer. Anthropic's documentation calls it the model's working memory. In a chat, that is:

  • your messages, from the first one to the last,
  • every file, picture or pasted text you added,
  • the tool's own earlier replies,
  • hidden instructions from the tool itself (the system prompt),
  • and the answer it is writing right now.

It is not the same as what the model learned in training (day 2). Training is the large library it learned patterns from. The context window is the desk in front of it for this one chat.

Tokens, in plain words

The window is measured in tokens: the small pieces of text the model works with. A token can be a word, part of a word or a punctuation mark. The exact count depends on the model and the language, and you never need to count them by hand. What matters is the idea: long files, long replies and many turns all fill the same desk.

How big the desk is differs per tool, per model and sometimes per plan, and it changes when a vendor releases a new model. Anthropic publishes the sizes for Claude on its help pages. The other help pages read for this course do not give a size for their chat apps. So do not rely on a number from a blog post; look it up for the tool you use, or simply watch for the signs below.

What happens when the chat gets long

Two things can happen, and the tool does not always tell you which.

Early details get pushed out or squeezed. Anthropic's documentation says chat apps such as claude.ai can drop the oldest part of a conversation first when the window fills up. Claude's help also describes that with code execution turned on (a setting that lets Claude run small programs), Claude summarises earlier messages when a chat gets close to the limit, so it can keep going. A summary keeps the gist and can lose the detail.

Details blur before the desk is full. Anthropic's documentation says that as the number of tokens grows, accuracy and recall go down, and that more context is not automatically better. In plain words: a rule you gave in message 2 can be followed less carefully in message 40, even if it technically still fits.

Other tools handle this in their own way, and their help pages say less about it. The signs are the same everywhere: the tool forgets a rule from the start, contradicts something it said earlier, or confuses two versions of a file.

When to start fresh

Start a new chat when you switch to a different task, when you have added several large files, when the tool starts forgetting early instructions, or simply when the chat has gone on for a long time. Starting fresh is cheap. Losing your decisions is not, and that is what the handover summary is for.

A good handover summary is short and holds only what the next chat needs: the goal, the decisions made, the rules to follow, the current version of the work, and what is still open.

The steps

  1. Pick a long chat, or make one. Use a chat of your own about a safe task, or start one now: paste a stand-in document of a page or two and go back and forth for ten minutes. Put one clear rule in your very first message, such as "always write dates as 4 December 2026".
  2. Test the early rule. Ask for something late in the chat where that rule should apply. Note whether the tool still follows it.
  3. Ask for a handover summary. Pick your tool below and paste the prompt.
  4. Read and correct it. Summaries drop things. Add any decision or rule that is missing and cut anything wrong. You are the one who knows what matters.
  5. Start a new chat and paste it. Then ask one question that depends on a detail from the start of the old chat, and check that the answer gets it right.

Casper's example

Casper had spent an afternoon in one chat drafting a cleaning rota note for three buildings. In his first message he said: "Building C is closed on Fridays." Forty messages later the tool put a Friday shift in building C. The rule had blurred.

He asked for a handover summary. It listed the goal, the rota format and the three buildings, but not the Friday rule. He added it by hand, pasted the summary into a new chat and asked for the Friday rota. This time building C was left out. The summary, not the long chat, is what he now keeps for next month.

Common mistakes

  • Pasting the whole old chat into the new one. That fills the new desk straight away. Paste the summary.
  • Trusting the summary without reading it. The tool decides what seemed important. Check it against what you know mattered.
  • Keeping one chat for everything. One task per chat keeps the desk clear.

Deeper dive

Today's actions

Ticks are not saved without an account

Do it in your tool

Claude

  1. Open your long chat about the safe task. Ask for something late in the chat where the rule from your first message should apply, and note whether Claude follows it.
  2. In the same chat, paste the request below and send it.
    We will continue this work in a new chat. Write a handover summary of at most 200 words, with these headings:
    Goal:
    Decisions made:
    Rules to follow: (every rule I gave, also the ones from my first message)
    Current version: (the latest version of the work, or its outline if it is long)
    Still open:
    Do not add anything we did not discuss. Mark anything you are unsure about with [CHECK].
  3. Copy the summary into your own document. Correct it there: add any missing decision or rule and remove anything wrong.
  4. Start a new chat. Paste the request below with your corrected summary, fill in your question and send it.
    Here is a handover summary from an earlier chat. Use it as the starting point for this chat and follow its rules.
    
    [paste your corrected summary here]
    
    My question: [one question that depends on a detail from the start of the old chat]
  5. Check that the answer gets the early detail right. If not, add that detail to your summary and keep the improved version.

Note: Claude's help says that with code execution turned on, Claude summarises earlier messages when a chat nears the context window limit, and that longer chats use more of your usage limit. If you hit a length limit, start a new chat. Context window sizes depend on the model.

Checked on 4 December 2026 · Source: Claude Help Center: How do usage and length limits work? (opens in a new tab)

Create a free account to save your progress. Sign in or sign up