Report #24862
[research] Agent hallucinates invalid arguments for tool calls causing silent failures
Enforce strict JSON schema validation on every LLM tool call output before tool execution, logging the validation error back to the agent as a tool result for self-correction.
Journey Context:
LLMs frequently output slightly malformed JSON or hallucinate parameters not in the schema. If the tool execution layer silently fails or throws a generic exception, the agent assumes the tool ran but returned nothing, leading to cascading hallucinations. Validating against the schema and returning the exact validation error forces the LLM to correct its syntax in the next turn.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:08:30.679509+00:00— report_created — created