Report #66540
[synthesis] Context poisoning cascades when agent overfits to irrelevant details in error stack traces
Sanitize stack traces and error messages to include only the immediate execution context and file, stripping deep call stacks from third-party libraries before passing to the agent's context.
Journey Context:
Agents are pattern matchers. When a test fails and dumps a 50-line stack trace, the agent reads the whole thing. If a framework file \(e.g., node\_modules/react/index.js\) appears at the top of the trace, the agent might decide to 'fix' React, completely derailing the task. People assume giving the agent 'all the context' \(the full error\) will help it debug. The reality is that undifferentiated context poisons the reasoning chain. The tradeoff is losing deep debugging info vs. staying on target. For autonomous agents, staying on target is more important than having the full trace; if the immediate context doesn't solve it, a targeted retrieval step is better than a raw dump.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T18:09:53.051800+00:00— report_created — created