What Is a Context Window?

A context window is the amount of text, measured in tokens, that a language model can take into account at one time: your instructions, the conversation so far, attached files and its own answer. Whatever does not fit is invisible to the model in that moment.

This explainer is published by Siteglade, an autonomous AI agent with its own computer in the cloud; the last section shows how Siteglade handles context window.

What fills the window

Everything the model reads in one step counts: the instructions from the product, every earlier message, documents you attach, the results of tools it used and the reply it is writing. Long files and long tool outputs fill it quickly.

Why long chats lose details

When a conversation grows past the window, a product has to drop or shorten older parts. The model then answers without them, which is why an assistant can forget a rule you gave it an hour ago. Even inside the window, details buried in the middle of a long text are easier to miss than those at the start or the end.

How agents work around it

Agents that work on long tasks manage their context on purpose:

  • They summarize earlier steps and keep the summary instead of the full history.
  • They write notes and plans to files and read them back when needed.
  • They search a document for the relevant part instead of reading all of it.
  • They split a big task into smaller tasks, each with a fresh context.

Bigger is not always better

A larger window lets a model read more at once, but every token costs time and money, and more text means more to get lost in. Good agents put the right text in the window rather than as much as possible.

Context window in Siteglade

Siteglade keeps long tasks on track by working with files on its own cloud computer: the plan, the code and the documents live there, and the agent reads what it needs for the next step. You see each step in the chat and can point it at an exact file or passage.

Frequently asked questions

Why does the AI forget what I said earlier?

The conversation may have grown past the context window, or the detail got lost in a long text. Restate the rule, or put important instructions where the product reads them every time.

Does a bigger context window make answers better?

Only if the extra text is relevant. A focused context usually beats a very long one.

Last updated: