Report #90375
[synthesis] Agent confidently makes multiple wrong steps based on parsing an API error message as valid data
Enforce strict schema validation on all tool outputs. If a tool returns a non-200 status or fails schema validation, intercept it and return a standardized, minimal error string to the agent, explicitly instructing it to stop and try an alternative approach.
Journey Context:
When an API call fails \(e.g., 404 or 500\), it often returns HTML or a JSON error object. LLMs are overly permissive parsers and will try to extract 'data' from the error payload, forming a plan based on the error text. This leads to a chain of confidently wrong tool calls. Developers often rely on the LLM to 'notice' the error, but LLMs are biased toward treating tool outputs as valid progress. The right call is programmatic interception and schema validation before the LLM ever sees the raw error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:17:20.194753+00:00— report_created — created