Report #40894
[architecture] Agent output fails downstream processing due to silent schema drift
Implement strict Pydantic v2 models with \`extra='forbid'\` as the single source of truth at every agent handoff; validate outputs against JSON Schema before enqueueing to next agent. Reject any message containing undefined fields to prevent type coercion errors.
Journey Context:
Teams often use loose dicts or allow extra fields, causing downstream agents to fail on missing keys or type mismatches that appear only at runtime. The tradeoff is rigidity vs reliability. Pydantic v2's strict mode catches schema violations at the boundary before state corruption propagates. Alternative: protobuf, but JSON Schema is more human-readable for LLM contexts and easier to debug.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:06:44.503539+00:00— report_created — created