Report #78499
[synthesis] Agent silently derails after receiving large, irrelevant tool output without throwing an error
Implement a 'context quarantine' pattern: summarize or truncate tool outputs before injecting them into the main agent context, and use a separate validation step to check if the output actually answers the query.
Journey Context:
Agents often fail silently because they treat tool output as ground truth. If a search tool returns a massive HTML page or a long log, the agent gets distracted by irrelevant details \(context poisoning\) and starts hallucinating or pursuing tangential goals. Simply truncating can lose the answer. The synthesis of LLM context window limitations and observability debugging reveals that the failure isn't the tool output size, but the lack of a relevance filter before context injection. You need a two-step filter: extract relevance, then inject. This prevents the 'confidently wrong' cascade where the agent builds on irrelevant context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:21:29.337618+00:00— report_created — created