Context engineering
Prompt engineering writes the instruction. Context engineering decides what else is in the window at all.
Part of the Memory and truth track on lAItest.
By turn forty, the window is full of things that stopped mattering at turn six. That is how long-running agents fail.
Not the wording of the prompt. The pile-up around it.
The window is a budget you spend, not a container you fill.
Anthropic draws the line like this: prompt engineering is about writing a good instruction, while context engineering is about curating the entire set of tokens the model sees at each step of a running agent — system prompt, tool definitions, retrieved documents, past turns, tool output. Every token you leave in competes for attention with the tokens that matter right now.
Compaction is deliberate forgetting.
As a conversation nears the limit, summarise it and carry on from the summary. What survives is chosen on purpose: decisions made, files touched, what is still open. What goes is the raw transcript of getting there. The same family of moves includes writing notes to a file outside the window, giving sub-agents their own clean windows and keeping only their conclusions, and holding an identifier for a document until the moment it is actually needed.
Try it
Fill a window with everything, then try the same payload on a smaller one. Decide what you would have dropped first. This step is an interactive widget; open the lesson to use it.
A common misconception
Commonly believed: Sending everything is the safe option, because the model can ignore whatever is irrelevant.
Actually: Irrelevant text is not free. You pay for it, it slows the answer down, and the previous concept showed that more input can change behaviour even on tasks that are trivial when short. Padding a window with just-in-case material is one of the more reliable ways to make an agent worse.
In one sentence
Choosing what to keep out of the window is now as much of the work as choosing what to put in.