The State of Context Engineering

Open original

David Breunig's talk on how context engineering emerged after the long-context push of 2024, why bigger context windows introduced new failure modes, and the six patterns builders now use to manage what goes into a model's context. It's a useful map of where the practice has been and where it's headed.

  • Million-token context windows didn't solve the problem. Long contexts add room for errors as well as information, leading to failure modes like context poisoning, distraction, confusion, and clash.
  • Gemini 2.5 playing Pokémon shows poisoning in practice: a fact baked into its weights (the tea bribe from the older game) got stuck in its context and cost it hours. Performance also degraded past roughly 100,000 tokens, with the agent repeating old actions instead of planning new ones.
  • Breunig's research cites shows instruction-following drops as bad examples pile up in context, affecting every model tested, including smaller ones that fall below half adherence after a few contradictions. The six-tool toolbox (augmentation, loadout, quarantine, pruning, offloading, summarization) has stayed stable as these problems emerged.

Drew Breunig's talk "Context Fails & Fixes," given at AGNTCon, traces how context engineering got here and where the failures come from. The story starts at the end of 2024, when the prevailing hope was that million-token windows (Gemini 1.5 Pro led the way, with a 10-million-token model teased in the lab) would let you dump the whole internet into the prompt and skip retrieval and agent design. Breunig argues that more room just creates more ways to go wrong, and he names four failure modes: context poisoning (bad or stale information that the model can't shake), context distraction (long contexts pulling the model toward its history instead of its instructions), context confusion (irrelevant facts quietly skewing answers, such as memory features mixing work and personal projects), and context clash (tool calls and skills conflicting inside the harness). His clearest illustration of poisoning comes from Gemini 2.5 playing Pokémon. In the original Game Boy version, a thirsty guard wants lemonade; FireRed changed it to iced tea. The model had absorbed the tea version from its training, and it repeatedly convinced itself it needed to find tea while playing the older game, burning hours on a task that didn't apply. For distraction, he cites the paper "Do as I Say, Not as I Do" by Camassa and Shiller, where models were told to answer in Russian but were shown examples answering in French. Smaller models like Gemma 3 12B dropped below 50% instruction-following after only a few contradictory examples. Even Opus 4.6 degraded, just later. His practical takeaway: he resets his own sessions around 200,000 to 300,000 tokens rather than riding them to the limit, and about half the audience admitted to running coding sessions to a full million. The broader point is that context engineering is less about stuffing information in and more about deciding what the model should see and when. Breunig's framing is that the core job is knowing when to be deterministic (hard rules, explicit structure, clean state) and when to lean on the model's probabilistic behavior, and that model-specific quirks, not just human-style clarity, define the failure modes. Worth reading if you build agents or spend long sessions in coding tools, since the failures he describes show up in ordinary use, not only in benchmarks.

Ask about this article