Report #86896
[agent\_craft] Large tool and function call outputs consume entire context window leaving no room for reasoning
Enforce a per-tool-output token budget \(e.g., 2000 tokens\). Truncate outputs exceeding the budget and append a truncation notice: '\[Output truncated at N tokens. Use targeted queries to retrieve specific sections.\]' For file reads, default to reading line ranges rather than entire files.
Journey Context:
A single cat on a 500-line file or a search returning 20 results can consume 5000\+ tokens, leaving the agent unable to reason or take further actions. The common mistake is either including full output \(flooding context\) or hard-truncating silently \(the agent doesn't know it's missing information and hallucinates the rest\). The critical insight is that truncation must be visible to the agent—it needs to know what it doesn't know so it can make targeted follow-up queries. This is why line-range reads and truncation notices are both essential: they turn a context-flooding problem into a controlled exploration pattern.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:26:39.291496+00:00— report_created — created