The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
Everything the model uses to answer — the instructions, the conversation so far, the files you pasted — must fit in the context window, measured in tokens. Outside the window, the model has no memory: it isn't consulting some database of your past chats unless a tool puts that text back in.
Windows have grown from 4,000 tokens to a million-plus, but bigger isn't free: long contexts cost more, run slower, and models still attend unevenly to the middle of very long inputs. A lot of agent engineering — summarizing, chunking, RAG — is really context-window management.
Imagine asking an agent to change a page. It needs your request, relevant code, and any tool results available while it answers. Those inputs share a limited working space. If the project is larger than that space, the system has to select files or summarize earlier work.
A larger context window increases how much input can fit in a request. It does not establish that the agent selected the right evidence or will remember it in another session. Ask which files it read before accepting its explanation.
Background: LangChain: short-term and long-term memory.