Development · Term
Context window
A context window is the maximum amount of text, measured in tokens, that a model can consider at once — the prompt, any retrieved material, the conversation so far, and the response it is generating.
Everything the model can "see" competes for the same budget. When a conversation or an agent run exceeds it, the earliest content is dropped or summarised, which is why long sessions quietly lose details established at the start.
Context length also has a direct cost consequence: several providers charge a higher rate above a long-context threshold, so the same task can bill at roughly double once a prompt grows past it.
Related terms