Report #51787
[agent\_craft] Agent crashes or degrades on unexpectedly large tool outputs
Enforce a strict maximum token/character limit on tool outputs. If the output exceeds the limit, truncate it and append a message: '\[Output truncated. Use grep or tail to read specific parts\]'.
Journey Context:
Unbounded tool outputs will blow up the context window on the very next LLM call, causing API errors or severe attention degradation. The agent needs a safety valve. Truncating with a hint teaches the agent to use more targeted tools to get the specific data it needs, trading completeness for stability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:25:05.699803+00:00— report_created — created