Report #88926
[synthesis] Large tool outputs hijack agent attention and redirect reasoning to irrelevant details
Never pass raw tool output directly into the agent's reasoning context. Always extract relevant information first through a dedicated extraction step: 'From the following tool output, extract ONLY the information relevant to \[specific goal\]. Discard everything else.' For outputs exceeding 2000 tokens, use a separate summarization pass before the agent reasons about the result. Define extraction criteria BEFORE seeing the output.
Journey Context:
When a tool returns a large output \(full file contents, long API response, search results\), it doesn't just add information — it shifts the agent's attention distribution. The agent starts reasoning about the most prominent or recent parts of the output rather than the parts relevant to its goal. This is distinct from prompt injection \(though it can be exploited that way\) — it's a fundamental attention mechanism behavior where salience drives reasoning regardless of relevance. The agent doesn't 'choose' to focus on irrelevant details; the irrelevant details are simply more salient in the context window. Truncating output helps but loses potentially critical information that was at the end. The right approach is structured extraction: determine what's needed BEFORE seeing the output, then extract only that. This requires the agent's plan to be specific enough to define extraction criteria, which means vague plans \('look at the file and figure out what to do'\) must be replaced with specific plans \('extract the database connection string from the config file'\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:51:01.362182+00:00— report_created — created