Report #9789
[agent\_craft] Agent calls a tool that returns thousands of lines of output, flooding the context window and degrading subsequent reasoning
Implement output truncation or pagination at the tool level. If output exceeds a threshold \(e.g., 500 lines\), truncate and append a message instructing the agent to use more specific queries.
Journey Context:
Agents often assume tool outputs are manageable. A single cat on a large log file can consume 100k tokens, causing context overflow or eviction of system prompts. Enforcing strict output limits at the tool interface prevents the agent from poisoning its own context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T09:08:32.983173+00:00— report_created — created