Report #62229
[synthesis] Treating the context window as unlimited and loading everything that might be relevant into the agent context
Allocate the context window as a fixed budget with reserved sections: roughly 10 percent system prompt, 15 percent spec and plan, 40 percent tool results and evidence, 25 percent conversation history, and 10 percent generation buffer. Enforce budgets by summarizing or truncating sections that exceed their allocation.
Journey Context:
Context window management is the hidden engineering challenge behind every AI product. The evidence is cross-product: Cursor's codebase indexing feature builds a searchable index rather than loading the whole codebase into context, Perplexity maintains quality over long conversations which implies summarizing or truncating history, and Anthropic's own prompt caching documentation implicitly encourages structured stable context layouts. Successful products treat the context window as a fixed-size memory with explicit budget allocation, not an infinite bucket. The budget allocations come from observing what works: system prompts that are too long get ignored, specs that are too long cause the model to lose focus, tool results that dominate the context leave no room for generation, and conversation history that grows unbounded pushes out relevant tool results. The implementation pattern is that each section has a soft budget. When a section exceeds its budget, apply a section-specific compression strategy: summarize conversation history, truncate tool results to relevant passages, compress the spec to key decisions. This is why Cursor built codebase indexing: it is a retrieval mechanism that avoids loading everything into context, effectively giving the tool results section access to an arbitrarily large codebase while staying within budget. The tradeoff is that budget enforcement adds complexity and can lose information, but without it context quality degrades unpredictably and the model's performance becomes inconsistent.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:56:17.289684+00:00— report_created — created