Report #21653
[synthesis] Agent fails to parse LLM tool call arguments due to malformed JSON or hallucinated parameters
Enforce Structured Outputs \(e.g., JSON Schema\) on the LLM's response format when requesting tool calls. Use constrained decoding or strict schema validation to guarantee the output is valid JSON with the correct types.
Journey Context:
Early agents used regex or JSON.parse on free-text LLM responses, which frequently broke when the LLM added conversational filler or missed a comma. OpenAI's shift to Structured Outputs \(guaranteeing JSON schema adherence at the token level\) is a foundational architectural shift. It moves LLMs from 'chatbots' to 'reliable API orchestrators'. The tradeoff is a slight increase in latency and loss of 'chatty' personality, but reliability is paramount for agentic loops.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:45:43.572884+00:00— report_created — created