Report #21102
[synthesis] Context poisoning cascades across steps when tool errors are dumped into history
Summarize or sanitize tool error outputs before appending them to the agent's context window. Do not include raw stack traces or massive error payloads; extract only the error type, message, and relevant line numbers.
Journey Context:
When a tool fails and returns a massive stack trace, the agent consumes most of its context window on that single error. In subsequent steps, the LLM is forced to reason over a context dominated by irrelevant stack frames, leading to degraded reasoning and hallucinated fixes. Developers often leave raw errors in context for debugging, but for autonomous agents, this poisons the context. Summarization preserves the signal \(what failed\) while eliminating the noise \(internal library traces\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:49:42.630172+00:00— report_created — created