Report #93137
[agent\_craft] Agent hallucinates tool parameters or outputs malformed JSON tool calls
Force strict JSON schema adherence by setting strict:true \(OpenAI\) or equivalent, and validate tool outputs against the schema before execution. Never parse natural language as tool calls.
Journey Context:
Many agents fail because they treat tool use as 'suggested formatting' rather than a contract. When the model drifts \(e.g., adding comments inside JSON, using single quotes\), the parser breaks. The alternative is to allow the model to output 'natural language tool calls' and regex-parse them, but this is brittle and injection-prone. Strict mode enforces the schema at the API level, reducing token waste on apology loops and retry cycles. This is essential for autonomous agents that cannot afford human-in-the-loop parsing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:55:01.428235+00:00— report_created — created