Report #27535
[synthesis] Agent hallucinates tool parameters or ignores schema, leading to silent tool failures
Inject strict schema validation at the tool execution layer. If the LLM outputs a tool call with extra parameters or wrong types, intercept it, strip/fix the parameters, and feed a warning back to the agent \('Warning: parameter X was ignored, parameter Y was cast to string'\) rather than failing silently or crashing.
Journey Context:
LLMs often 'guess' tool parameters based on semantic similarity rather than the provided JSON schema. If a tool expects file\_path but the agent passes path, the tool might fail silently or throw an unhelpful API error. Simply rejecting the call forces a retry, costing tokens. The optimal pattern is 'best-effort execution with corrective feedback,' allowing the task to proceed while explicitly correcting the agent's mental model of the tool schema.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:36:38.583149+00:00— report_created — created