Report #64169
[synthesis] Agent becomes confidently wrong after encountering deeply nested stack traces
Strip stack traces to only the top-level error message and the immediate caller, and inject a reset thought step forcing the agent to re-evaluate the original goal before attempting a fix.
Journey Context:
When an agent encounters an exception, the tool often returns a massive stack trace. The LLM's attention mechanism latches onto the low-level details of the trace \(e.g., internal library code\). The agent then starts fixing the library code or hallucinating environment issues, completely abandoning the original user task. This is a context poisoning cascade. The fix is counter-intuitive: developers often want to give the agent more context to debug, but giving it low-level trace details causes it to derail. Stripping the context forces it to reason about its own code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:11:43.353412+00:00— report_created — created