Report #96883
[architecture] Unstructured text between agents causes cascading parsing failures and hallucinated tool calls
Enforce strict JSON Schema contracts at agent boundaries using constrained decoding \(grammar-based generation\), and implement a schema validation gate that rejects non-compliant outputs before passing data to the next agent.
Journey Context:
Developers often pass natural language between agents, assuming the downstream LLM will 'figure it out.' This fails because LLMs are brittle with unstructured context and often hallucinate missing fields. Alternatives like regex extraction are fragile and break when the LLM changes its phrasing. Constrained decoding forces structural compliance, but doesn't guarantee semantic validity. Therefore, the contract must be a two-part gate: structural \(JSON Schema\) and semantic \(type checks, enum validation\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T21:12:00.700336+00:00— report_created — created