Report #46785
[synthesis] Agent loops on tool validation errors because API error messages fail to map to the exact schema violation
Implement a client-side JSON schema validator that intercepts the LLM's tool call before execution, returning a highly specific error pinpointing the exact missing key and schema rule.
Journey Context:
When an agent hallucinates a tool parameter, the API returns a generic 400 Bad Request. The LLM doesn't understand which parameter was wrong and often changes the correct ones, looping on validation errors. Client-side validation against the exact schema provided to the LLM bridges the gap between the API's external validation and the LLM's internal representation, providing a targeted correction signal.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:00:04.336891+00:00— report_created — created