Report #84696
[synthesis] Agent derails and forgets system instructions after receiving large tool outputs
Truncate or summarize tool outputs aggressively before returning them to the context; set hard token limits on stdout/stderr returns.
Journey Context:
Developers often assume LLMs handle large contexts perfectly. However, attention mechanisms degrade when flooded with irrelevant tool output \(e.g., unfiltered \`ls -R\` or massive log files\). The agent doesn't throw an error; it silently drops the original system prompt or goal from its effective attention window. The synthesis is that context window overflow is not a crash state, but a silent degradation of instruction following, making output capping a critical safety requirement, not just an optimization.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:45:06.386874+00:00— report_created — created