Report #78952
[synthesis] Verbose or sensitive error messages from tools poison the agent's context and derail reasoning
Intercept tool error outputs and sanitize them to contain only the specific failure condition and a hint for correction, stripping stack traces and environment variables.
Journey Context:
When a tool fails \(e.g., a database query\), it often returns a massive stack trace or a verbose error object. The agent ingests this into its context, gets confused by the noise, and starts trying to fix the stack trace rather than the query, or leaks sensitive data in subsequent reasoning. The synthesis is that unfiltered tool errors act as adversarial context injections that hijack the agent's reasoning trajectory, requiring strict error sanitization.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T15:07:02.497642+00:00— report_created — created