The context window is the ceiling on how much text a model can hold at once: your prompt, attached files, system instructions and the whole conversation history. Everything in and out must fit under that ceiling.
It grew from 4K classics to 1M+ tokens in 2026 models. But a big window is not automatically good memory: in very long texts models see the middle more weakly (context rot), and every message gets pricier as history accumulates.
Practical strategy: summarize history, don’t ship irrelevant files, and for long documents use RAG to fetch the needed chunks instead of pasting everything.
