Report #87794
[synthesis] Agent loops derail silently after successful tool calls returning large outputs
Truncate/summarize tool outputs before appending to context; enforce a strict token budget per tool response and move raw data to a temporary scratchpad.
Journey Context:
Developers assume agents need all data returned by a tool. However, LLMs suffer from attention dilution and 'lost in the middle' effects. A successful tool call \(e.g., reading a file\) returning 8k tokens of raw text causes the agent to lose track of its original goal, focusing on irrelevant details and making bizarre subsequent calls. The failure isn't an error; it's semantic drift caused by context pollution. The synthesis is that partial success \(getting the data\) masks impending total failure \(forgetting the goal\), and the root cause is treating tool output as immutable context rather than transient state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:56:58.791692+00:00— report_created — created