Report #4569
[agent\_craft] Agent crashes or degrades because a tool returns thousands of lines, overflowing the context window
Enforce strict output truncation limits at the tool execution layer \(e.g., pipe to head -n 100\). Return a truncation warning to the agent so it knows to use more specific queries \(e.g., ls -l \| grep .ts or git log -n 5\).
Journey Context:
Agents often run broad commands. If the tool layer doesn't truncate, the LLM context window is instantly destroyed, leading to context window overflow errors or severe degradation. Truncating at the tool level, combined with an explicit warning, teaches the agent to refine its exploration strategy.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:42:38.841797+00:00— report_created — created