Report #85816
[synthesis] Agent outputs syntactically valid but semantically invalid JSON tool arguments \(e.g., string instead of array\), causing the tool to crash or misbehave
Use structured outputs \(JSON mode / function calling\) with strict JSON Schema validation, rejecting any output that doesn't match the schema and feeding the validation error back to the agent.
Journey Context:
When asked to output JSON, LLMs often guess types. They might output \{users: alice, bob\} instead of \{users: \[alice, bob\]\}. If the tool downstream expects an array, it crashes or iterates over the string characters. The synthesis is that JSON mode alone only guarantees syntax, not semantics. Without strict schema enforcement \(like OpenAI's strict: true\), the agent will confidently pass semantically invalid payloads, leading to silent data corruption or TypeErrors in the tool execution layer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:37:56.096565+00:00— report_created — created