AI & DevelopmentDeveloper Tools

Context Engineering 2026: Stop Compacting, Start Harnessing

Isometric diagram showing the three-layer evolution of AI development: Prompt Engineering, Context Engineering, and Harness Engineering with upward progression arrows

The standard advice for managing AI context—summarize old turns, compact history, prune aggressively—is now costing teams twice as much while cutting memory recall by more than half. Drew Breunig’s The State of Context Engineering, published this week and trending on Hacker News with 134 upvotes, puts data behind what practitioners have been quietly discovering: in the prompt-caching era, keeping everything beats compacting. That’s the symptom. The underlying story is bigger—AI development has passed through three distinct eras in four years, and most developers are still optimizing for the wrong one.

The Economics of Context Have Flipped

The old playbook made sense when you paid full price for every token. Summarize the chat history, strip irrelevant turns, compact context before each call—you’d send fewer tokens and pay less. That logic inverted the moment providers introduced prompt caching. Anthropic, Google, and DeepSeek now bill resent context at 50–90% off fresh token rates. DeepSeek’s cached rate is $0.0028 per million tokens. At those prices, rewriting history to save tokens actively breaks cache hits and costs more than keeping everything.

Louis Bouchard measured this in production this month: full context history cost $0.11 per turn with 92% memory recall. The production compaction preset cost $0.24 per turn with 38% memory recall. The compaction approach sent 41% fewer tokens and paid 2.2x more, because it forced a cache miss on every turn. The threshold where keep-everything wins: cached input below roughly $0.55 per million tokens—which describes nearly every major provider right now. The practical fix is to stop compacting by default and name your actual constraint first: window too large means use RAG, not summarization; cached input too expensive means swap to a cheaper model; quality measurably degrading means measure where specifically.

There is a subtler failure here too. Summarization doesn’t just cost more—it fails silently. As Bouchard notes: “A blind judge rated answers 97-99% good while memory recall sat at 58%.” Your eval pipeline says everything is fine. Your agent has forgotten half of what the user told it.

Related: OpenAI 12-Hour Prompt Cache Is Live: What Agent Developers Must Do Now

Prompt, Context, Harness: Three Eras, Three Wrong Bets

Prompt engineering ran from 2022 to 2024. It was about crafting the perfect instruction—word choice, examples, role definitions. Gartner declared it out of date in July 2025 when context engineering took over: automated systems that dynamically assemble what goes into the window—RAG, tool definitions, conversation history, retrieved documents. Now in 2026, a third layer has emerged: harness engineering, which means designing the entire operational environment around an AI agent—constraints, orchestration logic, feedback loops, and lifecycle management.

The pattern across all three eras is consistent: each era’s solution created the next era’s problems. Long context windows, which were supposed to solve context limitations, introduced four distinct failure modes—context poisoning (bad facts become embedded and inescapable), context distraction (models over-focus on accumulated examples rather than instructions), context confusion (extraneous facts influence outputs unpredictably), and context clash (tools within a system conflict with each other). Agentic systems with persistent memory introduced their own failure modes on top.

The real-world signal on harness engineering is concrete. The OpenAI Codex team ran 7 engineers and GPT-5 agents to produce roughly 1 million lines of production code and 1,500 pull requests over five months. Their key finding: constraints enforced by linters and architectural rules were more effective than prompt instructions. Stripe’s “Minions” fleet merges 1,300+ PRs per week by mixing deterministic nodes (linters, commits) with agentic nodes (feature implementation), using explicit escalation rules that prevent infinite retry loops. In both cases, the leverage was in the harness, not the prompt.

Context Inertia: The 2026 Failure Mode Nobody Had a Name For

The most important finding in Breunig’s work this month is the naming of a failure mode that teams have been hitting without vocabulary for it. Context inertia occurs when an agent keeps chasing a hypothesis after the evidence says to stop—combining context poisoning with distraction, amplified by models trained to be relentless instruction-followers. Four independent research teams documented it simultaneously in October 2026: Anthropic’s Memento, Microsoft’s Fork-and-Flush, Stanford’s Stateless Language Agents, and UC Berkeley’s Scaling Discovery Requires Forgetting.

The numbers are stark. Thinking tokens per turn decline 75% as agent sessions grow longer—the accumulated context exhausts reasoning capacity rather than enhancing it. In Stanford’s study, 98% of final turns in long sessions produced no tool calls; the model was just processing its own context. Anthropic’s Memento project documented a Qwen agent spending hours debugging package versions when the actual bug was endpoint incompatibility. Berkeley’s forgetting-enabled agents gained 4.5–9.2% improvement on discovery tasks; standard continuous-context agents gained less than 2%.

The solution across all four research groups is the same: periodic context reset with deliberate state handoff. Anthropic’s Memento clears context every 90 minutes; the fresh agent inherits the codebase, environment, and a brief note—nothing else. This isn’t compaction or summarization. It’s a hard reset that preserves environmental state while discarding the accumulated context that causes inertia. The practical guidance: reset at 200,000–300,000 tokens as a preventive measure for long-horizon agent runs.

Related: Databricks MemCurrent: Agent Memory That Triples Pass Rates

Six Tactics, One Framework

Breunig identifies six context engineering tactics that have remained consistent across all three eras, even as the implementation has moved from prompts to code: augmentation (RAG and skill systems), tool loadout (filter which tools appear—one enterprise team discovered 600 skills loading per engineer and selective filtering fixed their performance), quarantine (subagents with blank histories sharing the same environment), pruning (removing turns no longer relevant, which Claude Code does automatically), summarization (compact into briefings, but only with relevance filtering first), and offloading (store state in files and databases rather than carrying it in context). The distinction from 2024 is that all six now belong in code, not in prompt instructions.

Key Takeaways

  • Stop compacting context by default. Prompt caching has inverted the economics—keep full history unless your window is literally full, then use RAG instead of summarization.
  • Context engineering is now the floor, not the ceiling. If your team is still primarily focused on prompt tweaking in 2026, you are one era behind.
  • Context inertia is real and now has a name. If your long-running agents plateau or obsess over dead-end hypotheses, reset context at 200K–300K tokens with deliberate state handoff—not compaction.
  • The leverage in 2026 is in the harness: constraints, orchestration, feedback loops, and lifecycle management. Code beats prompts at scale.
  • Eval pipelines lie about summarization quality. A high-scoring blind judge means nothing if memory recall is at 38%. Plant specific facts and probe them explicitly.
ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *