Report #65290
[architecture] Downstream agents fail because upstream agent output violates implicit assumptions about length, content, or format despite using structured outputs.
Insert a deterministic validation gate \(e.g., Pydantic validator\) between agents that halts execution and triggers a retry or correction loop if the output doesn't match the semantic contract.
Journey Context:
Agents are stochastic. Even with structured JSON output, an agent might return a valid JSON schema but with empty strings, invalid enums, or 10,000 words when 50 were expected. Passing this directly to the next agent breaks context windows. The mistake is relying solely on the LLM's 'promise' to follow instructions. The fix is treating the agent boundary like a network boundary: validate inputs strictly. The tradeoff is added latency from validation and potential infinite loops if the correction loop doesn't converge. Mitigate infinite loops with a max-retry counter that escalates to a human.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:04:15.744908+00:00— report_created — created