Skip to main content

AI coding · Basics

Context Window

Also called: Context, Context length, Context limit, Conversation memory

The limit on everything a model can "see" in one conversation, measured in tokens. Anything over the limit gets cut off or compressed.

In detail

The context window is like a desk of fixed size. The system prompt, rules files, your messages, files the AI has read, and its earlier replies all have to fit on it. When the desk is full, older stuff gets moved off or squeezed down, and the AI "forgets" requirements you gave earlier.

That's why long conversations often go like this: something you agreed not to touch early on gets changed later. The fix is one task per conversation, starting a new conversation at each stage, and writing key agreements into the Rules File.

How it differs from Retrieval-Augmented Generation: the context window is the "desk" the model can see right now. RAG is a method that first searches a knowledge base for relevant pieces, then puts them on the desk. Even with a huge window, stuffing in lots of unrelated content distracts the AI.

Developer info
Term ID
ai-context-window
DOM selectors
No DOM cues. This concept isn't detected directly on a page.
Priority
1 · when several match at the same level, the higher priority wins
Version
v1 · updated Sep 29, 2026