Report #74369
[gotcha] Allowing unbounded tool output size into the LLM context
Truncate or summarize tool outputs before returning them to the LLM. Set hard limits on the number of tokens a tool can inject into the context window.
Journey Context:
A tool reads a massive log file or fetches a huge webpage. If returned verbatim, it consumes the entire context window, causing the agent to lose track of its original instructions \(effectively a denial of service or forced context eviction\). Worse, a malicious tool could intentionally return gigabytes of data to crash the agent or push security instructions out of the context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:25:40.249601+00:00— report_created — created