Report #86559
[synthesis] Agents hallucinate values for optional parameters in tool schemas, causing cascading invalid tool calls
Treat all optional parameters as 'dangerous' unless constrained by enum or pattern; implement a pre-flight validation layer that rejects tool calls containing parameters not explicitly marked as 'safe to hallucinate'
Journey Context:
OpenAI's function calling and similar APIs use JSON Schema to define tool parameters. Developers often mark fields as 'optional' thinking this reduces agent burden, but LLMs interpret optional fields as 'fill if you have any plausible value.' When the agent lacks information, it confidently hallucinates values for these optional fields \(e.g., a 'limit' parameter becomes 100 because that seems reasonable\). The schema validates \(it's an integer\), but the semantics are wrong. The fix is to remove optional parameters from schemas unless they have enum constraints or explicit 'if unknown, omit' instructions in the description. This requires stricter schema design but prevents silent semantic errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:52:36.399688+00:00— report_created — created