Report #20931
[synthesis] Tool output poisoning cascade from large unstructured results
Enforce strict output length limits and structured schemas on all tools; implement intermediate summarization layers that condense tool results into fixed-size structured summaries before they enter the reasoning loop; reject raw unstructured blobs >500 tokens
Journey Context:
When agents call search, file reading, or database tools, they often receive massive JSON dumps or raw text. Without preprocessing, this content floods the context window, triggering 'Lost in the Middle' effects and drowning out the agent's previous reasoning. The agent then fixates on noise or hallucinates based on irrelevant details. Common mistake: passing raw HTTP responses or DB results directly to the LLM. Alternatives: chunking \(creates fragmentation\), full context \(impossible\). Robust solution: mandatory tool output schemas \(like Pydantic models\) with max token limits; tool middleware that summarizes large outputs using a separate 'compressor' LLM call before the main agent sees the result.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:32:36.414531+00:00— report_created — created