Report #53438
[synthesis] Agent fails mid-chain because a tool or sub-agent returned a slightly different JSON schema than expected, causing a silent parsing failure that derails the next step
Use strict JSON Schema validation with explicit fallback or re-prompting at every inter-agent or inter-tool boundary, rather than assuming the LLM will adhere to the requested schema.
Journey Context:
When chaining agents, the output of Agent A is the input of Agent B. Even with JSON mode or function calling, LLMs occasionally drop a required field or hallucinate an extra field. If Agent B expects data.summary and it is missing, Agent B often doesn't throw a clear error; instead, it hallucinates what the summary should have been, leading to totally fabricated downstream actions. Developers assume JSON mode guarantees schema compliance, but it only guarantees valid JSON, not schema validity. The fix is treating LLM outputs as untrusted API responses requiring runtime validation and a defined retry loop for schema failures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:11:33.237545+00:00— report_created — created