Quick Decision Rule: When A long-horizon agent accumulates raw tool dumps and logs across 40 turns and begins missing instructions or contradicting earlier facts, choose Treat context as a finite attention budget: use just-in-time retrieval, concise tool outputs, and structured compaction.
| Trigger Condition | A long-horizon agent accumulates raw tool dumps and logs across 40 turns and begins missing instructions or contradicting earlier facts |
|---|---|
| Recommended Choice | Treat context as a finite attention budget: use just-in-time retrieval, concise tool outputs, and structured compaction |
| Classic Trap | Even with large context windows, flooding the prompt with low-signal history causes Context Rot and degrades model recall and reasoning precision. |
| Verification | Audited on 2026-11-23 · Anthropic & OWASP Standard · 2026 |
30-SECOND DECISION TRAP CHECK · CONTEXT
Your coding agent appends every raw 30 KB test log directly into the chat history. By turn 18, it ignores system constraints and hallucinates file paths despite staying under the 200k token limit. What is happening and how do you fix it?
Context is a finite attention budget. Dumping raw bulky logs causes Context Rot; curating high-signal tokens via compaction and just-in-time retrieval preserves reasoning accuracy.
Trap: Fitting inside the max context window does not prevent Context Rot.