Report #82210
[synthesis] Residual entities or constraints from previous tool outputs incorrectly influence current step reasoning, causing the agent to conflate unrelated concepts across steps
Implement strict context isolation between steps: after each tool execution, generate a 'sanitized context' that explicitly lists only the relevant facts extracted from the tool output, removing all entity references not directly related to the current sub-goal; use this sanitized context rather than the raw tool output for subsequent reasoning
Journey Context:
In multi-step agents, the full output of a tool call \(often containing rich metadata, alternative suggestions, or related entities\) remains in the context window for subsequent steps. This causes 'semantic leakage' where the agent hallucinates connections between entities from previous steps and current objectives. RAG contamination studies show similar phenomena where retrieved documents poison generation. Common fixes like 'summarize after each step' lose critical details; strict entity filtering preserves necessary information while removing noise. The synthesis reveals that tool outputs should be treated as raw data requiring extraction, not as context to be carried forward. The alternative of carrying full tool outputs forward assumes the agent can perfectly ignore irrelevant information, which studies on in-context learning interference disprove.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:35:08.566801+00:00— report_created — created