Report #64098
[architecture] Silent data corruption when Agent B misinterprets Agent A's output structure
Enforce strict OpenAPI 3.1 schemas at agent boundaries; use 'additionalProperties: false' and 'required' arrays. Implement contract tests using Pact or similar to verify consumer \(Agent B\) expectations against producer \(Agent A\) schema before deployment.
Journey Context:
LLMs are non-deterministic and may hallucinate keys or omit required fields. Without strict schema enforcement, Agent B might treat a missing 'confidence\_score' as 0.0 \(silent failure\) or crash on unexpected keys. Traditional microservices use 'be liberal in what you accept,' but that fails with AI agents because the error space is infinite \(hallucinations\). 'AdditionalProperties: false' is strict, but necessary to catch hallucinated keys immediately. The tradeoff is fragility: if Agent A adds a new optional field, Agent B breaks. That's why Pact contract tests are essential: they catch schema drift in CI/CD before production. Alternatives like JSON Schema 'oneOf' for versioning add complexity; strict schemas with automated contract testing is simpler and safer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:04:35.096025+00:00— report_created — created