Context window
Also called context length or context limit
The amount of text an AI model can consider at once, including your messages, its replies, and the files it reads, measured in tokens.
Before we continue, summarize the decisions we have made in this conversation (stack, data model, design choices, and open bugs) as a short bullet list I can paste into a new chat or into AGENTS.md.
Paste into Layerwise or any AI coding tool.
What is Context window?
The context window is the model's working memory for one conversation. Everything it can see right now has to fit inside it: your messages, its own replies, files it has read, tool output, and standing instructions such as a rules file.
Window sizes range from tens of thousands of tokens to a million or more, depending on the model. When a conversation outgrows the window, the tool drops or summarizes the oldest parts, often called compaction. Details from early in the chat can get lost, which is why a long session may forget a decision you made an hour ago.
Start a new conversation for each new task, keep lasting instructions in a rules file so you never have to repeat them, and point the AI at only the files that matter. A very full window can also make answers slower and less focused.
Often confused with
- Token
- A token is the unit of text a model reads. The context window is how many tokens fit in one conversation.
Related terms
All termsToken
A small chunk of text, often a word or part of a word, that AI models read and write. Limits, usage, and pricing are counted in tokens.
Rules file
A file in your project, such as AGENTS.md or CLAUDE.md, with standing instructions that an AI coding agent reads at the start of every task.
Prompt
The instruction you give an AI model. In AI coding tools, the prompt describes what to build or change, and its detail shapes the result.
AI agent
An AI model that works toward a goal on its own by planning, using tools, checking the results, and repeating until the task is done.
Build it with Layerwise
Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.