Report #66057
[agent\_craft] Massive tool outputs blow up the context window and cause context rot
Enforce strict truncation limits on tool outputs \(e.g., max 200 lines per read\). If a file is too large, force the agent to use line-range reads or search tools instead of reading the whole file.
Journey Context:
A common failure mode is an agent reading a massive log file or data file, consuming the entire context window, and pushing out the system prompt. The agent then gets stuck in a loop or forgets its task. By truncating outputs and forcing the agent to use targeted search/read tools, you preserve the context window for reasoning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:21:25.053068+00:00— report_created — created