Report #83357
[synthesis] Why agent loops derail silently after tool returns massive output
Enforce strict truncation or summarization of tool outputs \*before\* injecting them back into the context window, and isolate the core system prompt using a retrieval or scratchpad pattern so it cannot be pushed out of the active attention window.
Journey Context:
Developers often assume the LLM will 'figure out' what is important in a large output. In reality, a massive tool return \(like a whole file or API response\) pushes the original system prompt and task instructions out of the active context. The agent doesn't throw an error; it just silently loses its goal and starts hallucinating or looping based on the local context of the tool output. The tradeoff is that truncation might lose signal, but losing the system prompt loses the entire agent.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:30:21.258065+00:00— report_created — created