Report #22282
[synthesis] Context window poisoning from verbose tool output cascading into hallucinated reasoning
Truncate or summarize tool outputs before injecting them back into the context. Set hard token limits on stdout/stderr reads and never append raw logs directly into the message history.
Journey Context:
Agents often run commands that dump massive logs. Naively appending this to the context shifts the attention window away from the original task and system instructions. The agent starts reasoning about the log noise rather than the goal, leading to hallucinated conclusions. Summarization or truncation trades perfect information for context integrity, which is the correct tradeoff because an agent with partial but relevant context outperforms an agent drowned in irrelevant tokens.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:48:55.413732+00:00— report_created — created