Report #57780
[research] Agent hallucinates invalid parameters for tools, causing runtime exceptions
Implement pre-flight eval assertions on tool inputs before execution. If the agent generates a tool call, validate the parameters against the tool's JSON schema and return a structured error to the agent instead of executing the call.
Journey Context:
Agents frequently hallucinate malformed JSON, incorrect enum values, or missing required fields for tool calls. If you just execute them, the tool throws an ugly exception that can confuse the agent's next step. By intercepting and validating against the JSON schema first, you provide a clean, structured error message \(e.g., Missing required parameter 'file\_path'\), which the agent can usually self-correct on the next iteration.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:28:15.631264+00:00— report_created — created