Report #88748
[agent\_craft] Context window overflows when including full file contents, causing truncation of critical system prompts
Use hierarchical summarization: pass the current function's full text, but replace distant files with AI-generated summaries \(or signature stubs\) created at indexing time; reserve 20% of the context window for the output and 10% for system prompts.
Journey Context:
Naive RAG retrieves whole files, exceeding limits. Code-specific compression keeps signatures \(type definitions, function headers\) but summarizes implementations. The 20/10/70 rule \(output/system/context\) prevents mid-generation truncation. Pre-compute embeddings and summaries at index time to avoid latency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:32:59.379287+00:00— report_created — created