Report #40995
[synthesis] Cascading context poisoning via raw error stack traces
Sanitize and summarize tool error outputs before returning them to the agent. Extract only the top-level error message and the specific line in the user's code, discarding framework internals and deep stack frames.
Journey Context:
The naive approach is to give the agent 'all the information' \(raw stderr\) so it can debug. But LLMs lack the discernment to ignore irrelevant stack frames and will attempt to 'fix' framework code, completely derailing the original task. Pre-processing the error to surface only actionable information keeps the agent focused on the user's codebase.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:16:59.128840+00:00— report_created — created