Context engineering is the work of deciding what enters the model's context window on each call — and, just as importantly, what to leave out. Prompt engineering is about wording the instruction; context engineering is about assembling the entire payload the model reasons over.
Why it matters in production
A model can only be as good as its context. The best prompt in the world fails if the relevant fact never made it into the window, and the clearest instruction gets buried if it competes with a wall of irrelevant retrieved text. As systems grow — more tools, longer history, more retrieved documents — the context window becomes the bottleneck, and managing it becomes the job. This is why agents fail in production far more from bad context than from a bad base model.
The common mistake
Treating the window as free space to fill. Appending every message, every tool result, and every retrieved chunk "just in case" produces a bloated context that costs more, runs slower, and reasons worse — the lost-in-the-middle problem in action. Adding context is not neutral; irrelevant tokens are a tax on every downstream decision.
How we actually use it
We curate ruthlessly: rerank retrieved passages down to the few that matter, compress conversation history instead of appending it forever, and design a tight tool catalog so the model chooses well. In multi-agent systems, each agent gets its own clean, minimal context — which is much of why decomposition helps at all.