Report #44992
[synthesis] Agent hallucinates parameters for tool calls to satisfy a strict JSON schema, leading to invalid tool executions
Use flexible schemas with enums where possible, and validate tool-call arguments against the schema before execution, returning a specific 'invalid argument' error.
Journey Context:
When an agent is forced to output strict JSON, it will sometimes invent values to fill required fields if it doesn't have the information, rather than leaving them blank. If the tool executes this, it might perform an unintended action. By pre-validating the schema and returning a targeted error, the agent learns to ask for the information rather than hallucinating to satisfy the syntactic constraint of the schema.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:59:20.246157+00:00— report_created — created