AI Insights · Oct 22, 2026 · Verified
What the labs say about context
Give the model the smallest set of information that's actually useful, watch how often your prompt cache gets reused, and let the agent look things up when it needs them rather than loading everything up front.

Claim
Four production teams agree on the same rules. Find the smallest set of high-signal tokens. Keep the prompt prefix stable and append-only so the cache hits. Provide less up front and let the agent fetch. Use the filesystem as restorable memory. Name the failure modes: poisoning, distraction, confusion, clash.
Evidence
- Anthropic (2025-09-29): context engineering is "curating and maintaining the best set of tokens during inference"; "context rot" is a gradient; system prompts at the "right altitude"; tools with minimal overlap; for long horizons use compaction, structured note-taking and sub-agents; "do the simplest thing that works"; smarter models need less prescriptive engineering.
- Manus (2025-07-18): KV-cache hit rate is "the single most important metric"; about 100 to 1 input-to-output ratio makes prefill dominant; cached input is 10x cheaper. Rules: no timestamps at the top, append-only, deterministic serialisation, mask tools rather than remove them, filesystem as context ("restorable compression"), a recited todo file, keep failures in context, avoid few-shot pattern drift.
- Cursor (2026-01-06): dynamic context discovery; long tool outputs to files, chat history as a searchable file, skills and MCP descriptions loaded by name; A/B showed a 46.9% reduction in total agent tokens on runs that called an MCP tool.
- Claude Code team (2026-04-30): the team alerts on cache hit rate and declares incidents when it drops; layout is static system prompt and tools, then CLAUDE.md, then session, then messages; past breakages were a timestamp, non-deterministic tool ordering and changed tool parameters; never swap models or tools mid-session; compaction is a cache-safe fork producing about 20k-token summaries; model switches via subagent handoff.
- LangChain: write, select, compress, isolate taxonomy.
- Breunig (2025-06-22): poisoning (a hallucination gets re-referenced), distraction (over-reliance on long context past about 100k tokens), confusion (every model worse with more than one tool on the function-calling leaderboard), clash (sharded multi-turn prompts cost 39% on average).
Open questions
- Whether Manus's logit-masking advice survives now that providers offer
allowed_toolsstyle restriction natively.
Sources
- https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents — blog, Sun Sep 28
- https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus — blog, Thu Jul 17
- https://cursor.com/blog/dynamic-context-discovery — blog, Mon Jan 05
- https://claude.dev/blog/lessons-from-building-claude-code-prompt-caching-is-everything/ — blog, Wed Apr 29
- https://www.langchain.com/blog/context-engineering-for-agents — blog, Tue Jul 01
- https://www.dbreunig.com/2025/06/22/how-contexts-fail-and-how-to-fix-them.html — blog, Sat Jun 21
AI-assisted research: gathered and summarised with AI from the sources above, each claim checked against them.