Context windows

Beginner · 6 min · Explain what fits in a context window and what happens at the limit.

  • foundations
  • long input

A context window is the total amount of text a model can consider at one time. Your current message, earlier turns, pasted documents and the model’s own replies all share it. When people say a model “remembers” — this is what they mean: the text still inside the window.

No window, no memory

Outside the window there is no memory to search, because there is no store: the model reads what it is given, each time. A new conversation starts with an empty window — which is why a chat that “knows” your project today knows nothing about it tomorrow unless you bring the context along.

What happens at the limit

Two things, and both matter:

  • Truncation. Systems cut from the oldest end first — measured in tokens, the start of a long chat is the first to fall out. Some tools warn you; many do not.
  • Attention dilution. Even content still inside a very large window competes for attention. Instructions buried deep in a 100-page paste are easier to lose than the same instruction stated right where it is needed.

Watch the window fill — and start pushing the oldest text out:

The context window everything the model can see right now

You Summarise the contract
Doc contract.pdf (40 pages)
AI Summary ready
You Draft a reply
AI Reply drafted
You Compare both versions
AI Comparison below

New messages push in from the right — and the oldest text slides out of the window on the left. Outside the window there is nothing: the model cannot look it up later.

A bad example

Three hours into a working session you ask: “Based on what I told you at the start, which vendor did I prefer?”

The first hour may have fallen out of the window already. The model answers from what remains — and rather than say “that part is gone”, it may guess. Fluently.

A better example

Ask: “Summarize the decisions we’ve made so far as bullets. Then I’ll start a fresh chat and paste that.”

A fresh window full of relevant, compact context beats a stale window full of transcript. This carry-forward habit is the single most useful long-session tactic.

Why it works

Treat the window as working memory you manage:

  • Keep what is relevant. Summarize and carry forward; drop the rest deliberately.
  • Restate what matters. If a rule is critical, say it near the work it governs — not three hours earlier.
  • Start fresh when it gets muddy. A new chat with a good brief beats a long one with a bad memory.

A habit that keeps long sessions useful: whenever the goal shifts, restate the standing facts in the new message — the reader, the constraints, the format. Three lines of recap cost seconds and protect everything that came before; drift happens exactly where a recap was skipped. The model never gets tired of instructions — it only stops seeing them.

Deep into a very long chat, the assistant seems to “forget” what you said at the start. Most likely explanation?

Practice

Fix the forgetting chat

You have been working in one long chat for hours. You ask about a preference you stated near the beginning, and the answer is confidently wrong — the start of the conversation has fallen out of the context window.

What is the best next step?

Choose one option
Hint

What is the smallest, most relevant context you could bring to a clean window?

Transfer

  • Long drafting project: keep a running “brief” to paste at the top of new sessions.
  • Research with many sources: work one source at a time, extract notes, then combine.
  • Any answer that contradicts something you said early: suspect the window before the model.

Key takeaways

  • The context window is everything the model can see at once — your message, the history, the documents.
  • At the limit the oldest content is dropped first, and instructions buried in a huge paste compete for attention.
  • Carry a short brief forward into fresh chats instead of hoarding transcripts.

Next

Next: Why AI makes things up — the failure mode both mechanisms predict. The context window glossary entry covers the basics.

Finished this lesson?