What context engineering is
What it is
The context is everything the model reads on one call. Context engineering is deciding, for each turn, what goes in it. It differs from prompt engineering in scope:
- Prompt engineering is writing the instructions well.
- Context engineering is assembling everything: instructions, tools, memories, documents, history and intermediate results, chosen and arranged afresh on every turn.
Why it matters
A model's decision can only be as good as what it was shown.
- Missing information produces a guess.
- Too much information buries the part that matters, and is paid for on every turn.
- Contradictory information produces unpredictable behaviour.
- In a twenty-step task the context is rebuilt twenty times, so small choices compound.
In the real world: A coding agent's quality problem turned out not to be the model: forty old file listings were crowding the context. Removing stale ones fixed it without touching a prompt.
Thinking of the context as an append-only log. Nothing forces you to resend everything that ever happened. The context is assembled by your code each turn, and you may select, trim, reorder and summarise.