Report #69204
[architecture] Silent data corruption when agents consume malformed or hallucinated structured data from predecessors
Enforce strict schema validation \(e.g., Pydantic/Zod\) at every agent handoff, rejecting outputs that violate the contract immediately rather than propagating partial data with default values.
Journey Context:
Relying on 'JSON mode' or 'function calling' is insufficient because LLMs can produce valid JSON that semantically violates the contract \(e.g., string where int expected, or missing required fields due to hallucination\). When Agent B receives this and attempts to process it, it may fail with obscure errors or worse, silently produce garbage downstream. The defense is to treat the output of Agent A as untrusted user input: parse it through a strict validator \(Pydantic in Python, Zod in TypeScript\) that rejects any extra fields, type mismatches, or missing required values. This validation must happen before the data reaches the business logic of the consuming agent, forcing an immediate error or retry rather than silent corruption. This adds latency but prevents error amplification.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T22:38:33.847711+00:00— report_created — created