AI & LLMs
What is a context window?
A context window is the maximum amount of text an AI model can consider at one time, measured in tokens, covering the prompt, the conversation so far, and any files or data included with it.
New to Bolt? Sign up free.
Technical definition
The context window is the fixed upper bound on the number of tokens a model can process in a single forward pass. It covers the system prompt, prior conversation turns, retrieved or attached content, and the model's own response. Once total tokens approach the limit, earlier content must be dropped, summarized, or selectively retrieved.
Window sizes vary by model and have grown by orders of magnitude, but the limit is absolute for any given model. Information outside the window does not exist as far as that request is concerned.
In plain terms
The context window is how much the AI can hold in its head at once.
When a conversation or a project outgrows that space, something falls out. The AI does not warn you. It answers as though it still has the whole picture.
Why it matters
This explains the most common frustration in AI building: the AI worked well for an hour, then started forgetting things, contradicting earlier decisions, or breaking features it had already finished.
That is not the model getting worse. It is the model no longer seeing the parts of your project it needs.
Knowing this changes how you work. State important rules in the prompt where they apply rather than trusting the AI to remember them from earlier. Point at the specific files a change touches. Keep unrelated exploration out of a working session. When a project gets large, expect to re-establish context rather than assume it.
