Context engineering is the job of deciding what a model sees at each step, and in 2026 it is still the hardest part of building AI agents. Drew Breunig’s 24 October 2026 essay, The State of Context Engineering, is a good snapshot of where the field stands, so here is a plain-English tour with extra sources.
Key takeaways
- Bigger context windows did not kill retrieval. Longer contexts “let you fit in more information, and more errors”, in Breunig’s words.
- Four classic failures (poisoning, distraction, confusion, clash) still explain most agent bugs.
- Six tactics fix most of them: augmentation, tool loadout, quarantine, pruning, offloading and summarization.
- Long-running agents add two new problems: fighting the weights and context inertia.
- Sometimes the best fix is to throw the context away and start clean.
What is context engineering, exactly?
Prompt engineering was about wording a single request. Context engineering is about assembling everything the model reads: instructions, documents, tool descriptions, and the history of what it has already done.
Anthropic’s engineering team gives the most-cited definition: the set of strategies for curating and maintaining the optimal set of tokens during LLM inference. A token is a chunk of text, roughly a short word or word fragment. Breunig adds a third label for 2026: harness engineering, meaning the scaffolding and tooling around the model.
Did million-token windows make this problem go away?
No. In late 2024 many people expected huge windows to replace retrieval. Windows grew from about 128K tokens (GPT-4o) to 1M (Gemini 1.5 Pro), and Llama 4 Scout shipped with 10M. Breunig notes that it “never really caught on”.
The reason is that more room means more places for mistakes to hide. Think of a desk: a bigger desk lets you pile on more paper, but you will not find the right page any faster.
What are the four classic context failures?
Breunig named these in a June 2025 post, and his new essay revisits them.
| Failure | What happens | Example |
|---|---|---|
| Poisoning | A wrong fact enters the context and keeps getting reused | Gemini 2.5 playing Pokémon fixated on finding tea, which exists in the 2004 remake but not the 1996 original |
| Distraction | The model leans on its history instead of reasoning fresh | Past roughly 100K tokens, the Gemini agent repeated earlier actions instead of making new plans |
| Confusion | Superfluous information subtly shapes answers | Irrelevant tools or documents get used |
| Clash | New information or tools contradict what is already there | Two instructions pull in opposite directions |
A research example of distraction: in the paper “Do as I Say, Not as I Do”, models were told to translate questions into Russian but shown example answers in French. Across 13 models, instruction-following dropped as contradictory examples piled up, per Breunig’s summary.
Which six fixes actually help?
- Context augmentation: pull in relevant information through retrieval (RAG) or skills.
- Tool loadout: expose only the tools a task needs. Breunig cites one enterprise team that loaded 600 skills per engineer, and performance suffered.
- Context quarantine: hand work to subagents that start with clean histories.
- Context pruning: delete history you no longer need.
- Context offloading: park information in files or databases instead of the window.
- Context summarization: compact old turns into a short recap.
None of this needs a giant framework. Breunig shows an agent is basically a dozen-line while loop, and he adds loadout, quarantine, pruning and summarization to a DSPy agent with about 16 lines of changes. He also warns that pruning can break prompt caching.
What new problems do long-running agents bring?
Agents are working for hours now. Breunig cites METR task-length measurements with a harness: 3.4 hours for GPT-5, 6.4 for Gemini 3.1 and 12.0 for Opus 4.6. Longer runs expose two failures.
Fighting the weights. Models are overfit to the tools and environments they trained in. Breunig notes that Claude Code’s system prompt repeats its parallel-tool-use instruction several times, because training environments were mostly serial.
Context inertia. The model locks onto a hypothesis and will not let go. In one Qwen agent run, it spent hours debugging package versions when the real problem was an endpoint incompatible with the grader.
The surprising evidence is that forgetting helps. On a task called AHC014, Berkeley researcher Shangyin Tan reported that four agents with periodic forgetting scored 1,144,695, against 1,007,073 for four parallel agents and 961,136 for one agent.
When should you just delete your context?
Earlier than you think. Breunig’s personal warning line is around 200,000 tokens, and he says someone sitting at 800,000 should “delete your context”. That is his rule of thumb, not a universal threshold, and your model and task will differ.
The practical version: write down what matters in a file, clear the window, and let the agent reload only that. We covered one repo doing this in Claude Code Context Window: How One Repo Cut 390,200 Tokens.
What happens next
Breunig predicts the next problem is memory that lasts months. After six months with a personal agent called Hermes, he reports skills collecting conflicting fixes and memories turning messy. His bet for 2027 is that strategic forgetting becomes a core skill.
My opinion: this is the right call. Teams spent two years adding memory to agents, and the next win is probably deleting it well.
FAQ
Is context engineering the same as prompt engineering?
No. Prompt engineering tunes the wording of one call. Context engineering manages everything the model sees across many steps, including tools, retrieved documents and history.
Do bigger context windows fix agent mistakes?
Not on their own. Longer contexts hold more information and also more errors, which feeds poisoning, distraction and confusion.
What is the cheapest improvement to try first?
Trim your tool list and clear stale history. Breunig frames context as the cheap, fast lever, compared with using a bigger model (expensive) or letting it think longer (slow).
Next step: open your agent’s last long run, find the point where it started repeating itself, and test what happens if you reset the context there.
Leave a comment