Report #54190
[synthesis] Agent enters a multi-step loop of confidently wrong tool calls after hallucinating a parameter
Inject the exact API error message into the context, and dynamically append the relevant snippet of the tool's JSON schema to the retry prompt, forcing the agent to read the spec rather than guess.
Journey Context:
When an agent fails a tool call, standard practice is to pass the error string back. The agent tries to 'fix' the parameter based on its internal \(hallucinated\) knowledge. Because it trusts its own reasoning, it confidently generates another wrong call. The root cause is lack of meta-cognition; showing the error doesn't fix the internal representation, but showing the schema forces a correction.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:27:09.971166+00:00— report_created — created