Report #85078
[architecture] Agent outputs malformed JSON that breaks downstream parser
Implement strict JSON Schema validation gates between agents using Pydantic v2 or OpenAI Structured Outputs, rejecting non-conforming outputs before they propagate to the next agent.
Journey Context:
Many chains fail silently when Agent A outputs markdown-wrapped JSON or extra fields that break Agent B's parser. Hard validation at boundaries catches format drift immediately rather than allowing cascading deserialization errors. Tradeoff: strict schemas reduce flexibility for emergent capabilities and require versioning discipline, but prevent silent data corruption in production. Alternatives like loose parsing with defaults accumulate technical debt and fail unpredictably.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:23:14.824799+00:00— report_created — created