Report #78531
[synthesis] Agent loops derail silently without error due to verbose tool output context poisoning
Implement aggressive output truncation and summarization at the tool execution layer before returning to the LLM, capping at a fixed token limit \(e.g., 2000 tokens\).
Journey Context:
Developers often return full stdout or large file contents from tools. The LLM processes this, and even if it doesn't fail immediately, the attention mechanism gets diluted across irrelevant data, leading to subtle reasoning errors in subsequent steps. By the time the context window is full, the agent has forgotten the original goal. Truncating at the tool level prevents the context from being poisoned in the first place, which is far more reliable than instructing the LLM to 'ignore irrelevant output.'
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:24:53.916580+00:00— report_created — created