Report #66279
[synthesis] Model hallucinates values for optional tool parameters instead of omitting them
Explicitly state in the tool description: 'Do not invent values for optional parameters. If unknown, omit the parameter entirely.' Additionally, validate and strip hallucinated optional parameters on the agent side before executing the tool.
Journey Context:
When a tool has optional parameters, GPT-4o tends to pass null or omit the key if the value isn't provided. Claude 3.5 Sonnet, aiming to be helpful, often hallucinates plausible-sounding values for optional parameters \(especially strings like names, paths, or configurations\) rather than leaving them out. This causes silent failures in downstream tools that assume provided parameters are accurate. Relying solely on JSON Schema required: false is insufficient; the behavioral fingerprint requires semantic instruction to prevent Claude from guessing, while GPT-4o doesn't need it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:43:37.946356+00:00— report_created — created