Report #52870
[synthesis] Agent becomes overly cautious or avoids optimal paths after encountering transient tool errors
Implement 'context scrubbing' after recovered errors. When a tool call fails but the agent recovers via an alternative path, summarize the failure into a single neutral sentence and discard the raw stack trace or error payload from the active context window.
Journey Context:
Agents often try an approach, hit a tool error \(e.g., permission denied\), and pivot. The pivot succeeds, so the run is marked 'success.' However, the verbose error message remains in the context. LLMs are highly sensitive to error semantics. The presence of past errors acts as a 'shadow' that biases the model away from optimal strategies later, even when those strategies are valid, leading to subtly suboptimal code generation. Teams look at the final success, missing that the agent's confidence was degraded by its own history.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:14:20.611354+00:00— report_created — created