<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-state-of-context-engineering-tyagk0j1w" -->

---
title: The State of Context Engineering | daily.dev
description: Long context windows don't solve AI reliability; they just let in more errors, a talk on the state of context engineering argues. Four failure modes plague...
canonical: https://daily.dev/posts/the-state-of-context-engineering-tyagk0j1w
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The State of Context Engineering | daily.dev
og:description: Long context windows don't solve AI reliability; they just let in more errors, a talk on the state of context engineering argues. Four failure modes plague...
og:url: https://daily.dev/posts/the-state-of-context-engineering-tyagk0j1w
og:image: https://api.daily.dev/og/posts/TYAGK0j1w.png
og:image:alt: The State of Context Engineering
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The State of Context Engineering

**[Hacker News](https://daily.dev/sources/hn)** · 19 min read · 4 upvotes · 1 comments

## Summary

Long context windows don't solve AI reliability; they just let in more errors, a talk on the state of context engineering argues. Four failure modes plague long contexts: poisoning, distraction, confusion, and clash. Teams fix these with six harness tools: augmentation, tool loadout, quarantine, pruning, offloading, and summarization. As models run longer (Opus 4.6 hit about 12 hours on METR's benchmark), two new failure modes emerged: 'fighting the weights', where models default to their training biases, and 'context inertia', where agents fixate on one idea and won't stop. Anthropic's Memento harness fixes inertia by clearing context every 90 minutes while preserving the environment. The advice: once context passes around 200,000 tokens, reset it.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.dbreunig.com/2026/10/24/the-state-of-context-engineering.html>

## Questions this post answers

### What is context inertia in AI agents and how do you fix it?

Context inertia is when an AI agent hyper-focuses on one hypothesis, subtask, or goal and keeps pursuing it even after it should stop, a pattern documented by Anthropic, Microsoft Research, and UC Berkeley researchers. Anthropic's Memento harness fixes this by having the agent write a short note every 90 minutes, then clearing its running conversation while preserving the work already done in the environment.

_Anyone debugging stuck AI agents can track emerging context-management techniques like this on daily.dev._

### At what context length should I reset my AI coding agent's context window?

Around 200,000 tokens is cited as a reasonable warning point for resetting context in a coding agent, even though some models support context windows up to a million tokens or more. Beyond roughly 100,000 tokens, Gemini 2.5 was observed repeating actions from its history instead of synthesizing new plans while playing Pokemon, illustrating context distraction.

_Developers tuning agent context limits can follow practical thresholds like this on daily.dev._

### How long can AI agents like GPT-5 and Opus run on long-horizon agentic tasks?

On METR's benchmark, GPT-5 handled tasks around 3.4 hours, Gemini 3.1 reached about 6.4 hours, and Opus 4.6 reached around 12 hours of autonomous work using a harness. These gains come from models getting better at driving their harness and managing their own context over extended runs, not just raw context window size.

_Teams comparing agent endurance across models can track benchmark shifts like these on daily.dev._

## Community take

How the wider developer community reacted, aggregated from 2 discussions and 33 comments across hackernews (as of 2026-10-26).

**TL;DR:** Developers largely confirm the post's core premise from firsthand experience—models degrade as context grows—and share a wide range of personal workarounds (manual compaction, handoff files, ticketing systems, indexing) while debating the mechanics and value of automated pruning/compaction.

**Sentiment:** 10% positive · 55% mixed · 35% skeptical

**The case for**

- Multiple developers independently corroborate that model quality drops as context grows, validating the post's premise.
- Some report that deliberately checkpointing into artifacts (code, design docs) and starting fresh works well.
- Provider-native hosted compaction is seen by some as sufficient and preferable to building custom pruning logic.
- Newer long-horizon-trained models reportedly tolerate much larger context before degrading noticeably.

**The pushback**

- Using a cheaper decision model to prune context before compaction is seen by some as not economically worthwhile.
- Pruning or editing earlier turns can invalidate the KV/prompt cache, making sessions much more expensive.
- Some find that too little context also causes erratic agent behavior, not just too much.
- One commenter questions the post's framing, arguing that behavior caused by training-weight biases shouldn't be labeled as 'context poisoning'.
- Models sometimes behave oddly by prematurely trying to 'wrap up' sessions as context fills, suggesting trained-in but poorly understood compaction cues.

**By community**

- hackernews (mixed): Commenters broadly agree context degradation is real from personal experience, but diverge sharply on practical fixes like auto-compaction, native harnesses, and manual context management.

**Hottest debate:** Whether automated/decision-model-driven context pruning is worth the cache-invalidation cost and complexity, versus just relying on provider-native compaction or manual resets.

**Open questions**

- What is the actual rule or threshold models use internally to decide when to signal 'wrapping up' a session as context fills?
- Is there reliable benchmarking comparing custom context-pruning approaches against OpenAI/Anthropic's native hosted compaction?
- How should 'strategic forgetting' of conflicting or outdated memories be implemented well in long-running agents?

**Highlights**

> Anecdotally (sample size == 1), I have observed that as my context grows longer, the model seems to get dumber. I'm not an advanced user with harnesses, etc.; I just use the chat interface, as that's all I can afford, but after a few turns the model (I'm talking frontier models here from OAI and Ant) seems to just do stupider things.
> — [mlmonkey on hackernews · 4 comments](https://news.ycombinator.com/item?id=50236935)

> Yeah, I also think decision models for pruning context isn't worthwhile.  You're paying to load it into context (of your decision model), in order to save on loading the same data into context (of your generation model).  The only way the economics makes sense is if you need a much smarter model for the compaction, but can't pay for it to load all of that context (because it's uncached or something).  That sounds like a niche but it really doesn't exist.  Cheap models are good enough, and smart models are cheap enough. Personally, I use a harness extension that auto-compacts my context just before the cache expires.  Combined with the default compact-when-full, this ends up being pretty much always what I want.  It's one less thing to think about.
> — [CBLT on hackernews](https://news.ycombinator.com/item?id=50236891)

> It's nice that this article goes beyond the "context too long" scapegoat diagnostic. There is more to it than just reducing content in context. LLMs attention mechanism works by finding graphs of related words and concepts and it works best when the relevant relationships are close together in the text. Length matters but how well the information is organized matters as well. It's useful to be familiar with the concept of dependency length. The two sentences in this image ( https://benoitessiambre.com/img/dependencylength.png ) have the same words and same meaning but sentence C is organised to minimize the distance between related words. This can also apply to paragraphs and sections. Ordering them so that related information is recursively closer together, helps AIs think better (also helps humans, Dependency Length Minimization, DLM is an idea from psycho-linguistics). This is one reason progressive disclosure and sub agents are important. Including unnecessary information spreads apart surrounding information and makes it more difficult for AIs to figure things out. For eg. optimizing skills, it can help to put more important information at the bottom of a skill. Usually after a skill is loaded, the AI will start “thinking”, talking to itself to try to reason through a problem. The thinking block will have an easier time considering the text closest to it, the last part of the skill, than information farther up. Thinking blocks can produce a lot of text (a lot of it often hidden from users) that also spreads information apart. Sometimes, when an early instruction is still relevant but there’s been a lot of thinking and discussion added to the context since, it’s worth repeating a summary the early information ( keeping in mind that too many reminders can also spread other information apart ). I think however, LLMs are tuned to overweight very early information so that they don't disregard system prompts. You might be able to exploit this by placing some important facts near the very beginning of a conversation. If you've ever written compression algorithms where repeated blocks are referenced instead of encoded, you'll be familiar with how related information being clustered allows for better compression. It's another example of the parallels between intelligence and compression and it hints at the information theoretic aspect of DLM.
> — [BenoitEssiambre on hackernews](https://news.ycombinator.com/item?id=50238443)

> DeepSeek v4.1 flash seems to do this thing where it starts saying that we should wrap up the current work and start again "next session" (whatever that means), that the "context budget" is almost up, or some other wording I'm forgetting, as the context gets longer. I've taken to just manually making it write a handoff file and clearing context completely. I'm pretty much manually compacting instead of my harness doing it. Feels weird, but it does work.
> — [kadoban on hackernews · 1 comments](https://news.ycombinator.com/item?id=50237181)

> > The tea task for FireRed was in its weights, so it poisoned its context. Mmm, to my mind, isn't this mixing completely different things? I thought poisoned context is stuff in the context that makes the model behave poorly. But if it's in the weights, that's just... model issues.
> — [losvedir on hackernews](https://news.ycombinator.com/item?id=50236693)

**Source threads**

- [hackernews](https://news.ycombinator.com/item?id=50227000) · 3 points · 0 comments
- [hackernews](https://news.ycombinator.com/item?id=50235780) · 97 points · 33 comments

## Community discussion

Top comments from developers on daily.dev.

**@kartiknvj** · 0 upvotes

> Reading repetition and all-caps as a sign you're fighting the weights gave me a check to run today. I'm grepping my agent's system prompt for instructions repeated three or four times. On the Hermes skills piling up fixes that conflict, have you tried rerunning a few old tasks after each skill update to see which version still holds up?

## Similar posts on daily.dev

- [A Guide to Context Engineering for LLMs](https://daily.dev/posts/a-guide-to-context-engineering-for-llms-65kn2rx3v) · ByteByteGo · 3 upvotes · 0 comments
- [Context Window Management for Long-Running Agents: Strategies and Tradeoffs](https://daily.dev/posts/context-window-management-for-long-running-agents-strategies-and-tradeoffs-btfwkdimp) · Machine Learning Mastery · 0 upvotes · 0 comments
- [We Kept Adding Context to Our AI Feature. It Kept Getting Worse](https://daily.dev/posts/we-kept-adding-context-to-our-ai-feature-it-kept-getting-worse-ahgwujixf) · Medium · 0 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#llm](https://daily.dev/tags/llm), [#claude-code](https://daily.dev/tags/claude-code), [#context-engineering](https://daily.dev/tags/context-engineering)

[View this post on daily.dev](https://daily.dev/posts/the-state-of-context-engineering-tyagk0j1w)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The State of Context Engineering","url":"https://daily.dev/posts/the-state-of-context-engineering-tyagk0j1w","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-state-of-context-engineering-tyagk0j1w"},"datePublished":"2026-10-25T23:46:55.024Z","dateModified":"2026-10-26T03:33:16.185Z","description":"Long context windows don't solve AI reliability; they just let in more errors, a talk on the state of context engineering argues. Four failure modes plague...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3110ba76e6b56699fc9b79634a9bec7a?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3110ba76e6b56699fc9b79634a9bec7a?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/the-state-of-context-engineering-tyagk0j1w","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"ai-agents,llm,claude-code,context-engineering","timeRequired":"PT19M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"The State of Context Engineering"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/the-state-of-context-engineering-tyagk0j1w","comment":[{"@type":"Comment","text":"Reading repetition and all-caps as a sign you’re fighting the weights gave me a check to run today. I’m grepping my agent’s system prompt for instructions repeated three or four times. On the Hermes skills piling up fixes that conflict, have you tried rerunning a few old tasks after each skill update to see which version still holds up?","datePublished":"2026-10-27T12:38:05.705Z","url":"https://daily.dev/posts/TYAGK0j1w#c-mIonrRSmY","author":{"@type":"Person","name":"kartik-nvjk","url":"https://daily.dev/kartiknvj","image":"https://media.daily.dev/image/upload/s--3gGgsVCw--/f_auto/v1781456774/avatars/avatar_TvTVeiMdkRCqWUDullFmy?_a=BAMAMiWQ0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-state-of-context-engineering-tyagk0j1w#faq","mainEntity":[{"@type":"Question","name":"What is context inertia in AI agents and how do you fix it?","acceptedAnswer":{"@type":"Answer","text":"Context inertia is when an AI agent hyper-focuses on one hypothesis, subtask, or goal and keeps pursuing it even after it should stop, a pattern documented by Anthropic, Microsoft Research, and UC Berkeley researchers. Anthropic's Memento harness fixes this by having the agent write a short note every 90 minutes, then clearing its running conversation while preserving the work already done in the environment. Anyone debugging stuck AI agents can track emerging context-management techniques like this on daily.dev."}},{"@type":"Question","name":"At what context length should I reset my AI coding agent's context window?","acceptedAnswer":{"@type":"Answer","text":"Around 200,000 tokens is cited as a reasonable warning point for resetting context in a coding agent, even though some models support context windows up to a million tokens or more. Beyond roughly 100,000 tokens, Gemini 2.5 was observed repeating actions from its history instead of synthesizing new plans while playing Pokemon, illustrating context distraction. Developers tuning agent context limits can follow practical thresholds like this on daily.dev."}},{"@type":"Question","name":"How long can AI agents like GPT-5 and Opus run on long-horizon agentic tasks?","acceptedAnswer":{"@type":"Answer","text":"On METR's benchmark, GPT-5 handled tasks around 3.4 hours, Gemini 3.1 reached about 6.4 hours, and Opus 4.6 reached around 12 hours of autonomous work using a harness. These gains come from models getting better at driving their harness and managing their own context over extended runs, not just raw context window size. Teams comparing agent endurance across models can track benchmark shifts like these on daily.dev."}}]}
```

