Context Management
Problem
An agent has:
* instructions,
* conversation,
* documents,
* tool results,
* previous decisions.
But a model can only reason over the information currently available in its context.
Giving it everything forever is expensive and eventually impossible.
Solution — Context Management
Select, summarize, retrieve and preserve the information relevant to the current step.
For example, VS Code's Copilot Chat assembles each model request from instructions, chat history, relevant document excerpts, and tool results. As context fills, older conversation is compacted into a summary used in later requests; further compaction can update it as work continues.
The summary is part of the session's context; its storage depends on the extension. Summarization aims to retain the goal, constraints, decisions, and unfinished work, but can omit details. Explicitly reference important documents and keep lasting rules in project instruction files.
Core idea: context management decides what information the model should know right now.