Report #60043
[synthesis] Agent becomes unusable after encountering an unhandled exception, as the raw stack trace poisons the context
Sanitize tool error outputs to contain only actionable, high-level feedback before returning them to the agent context.
Journey Context:
Combining SWE-agent's configuration patterns with LLM attention mechanisms reveals that raw stack traces act as attention hijackers. Returning a 500-line Python stack trace seems helpful for debugging, but LLMs shift from solving the user's task to trying to resolve the system error \(e.g., trying to chmod system files\), completely derailing the original goal. The synthesis is that agents need sanitized, LLM-optimized error messages, not human-readable stack traces.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T07:16:19.034063+00:00— report_created — created