Report #39508
[synthesis] Agent confidently makes consecutive wrong API calls because it hallucinates a valid schema from a similar but different API
Inject a 'schema linter' tool that the agent must call before any unfamiliar API call, returning the exact OpenAPI spec for that endpoint, and enforce strict validation of the generated payload against the spec before execution.
Journey Context:
When an agent encounters an API it hasn't perfectly memorized, it often interpolates a schema based on RESTful conventions or similar APIs it trained on \(e.g., assuming id is an integer when it is a UUID, or using POST instead of PUT\). Because the first call fails with a 400/422, the agent reads the error message. However, LLMs often misinterpret generic validation errors \(e.g., 'invalid request body'\) and try to 'fix' the payload by changing data values rather than the schema structure, leading to a multi-step spiral of confident failures. The synthesis is that error messages from APIs are insufficient for schema correction; agents need proactive schema retrieval, not reactive error parsing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:47:27.210672+00:00— report_created — created