Report #70751
[frontier] Agents hallucinate tool parameters or call wrong tools entirely
Use JSON Schema/Zod as the Agent ABI; generate tool definitions from types and enforce structured output mode exclusively, never parsing free-form text
Journey Context:
Prompt engineering with 'please return JSON' is brittle and prone to hallucinated keys or markdown fences. The shift is treating the interface as strictly typed: define tools as Zod schemas, generate function definitions from TypeScript types, and use the model's constrained decoding \(structured outputs\) to guarantee valid JSON matching the schema, eliminating parsing logic and parameter hallucinations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:20:15.430247+00:00— report_created — created