Report #45173
[architecture] Free-text agent handoffs cause hallucination cascades and context window bloat
Enforce strict JSON schema contracts at agent boundaries using structured output generation, treating inter-agent communication like an API contract rather than a chat conversation.
Journey Context:
Developers often pass the raw string output of one agent as the system or user prompt to the next. This causes the receiving agent to hallucinate on irrelevant context or misinterpret instructions. By forcing the producing agent to serialize its output into a strict schema \(e.g., via tool calls or response\_format\), you create a type system that bounds the receiving agent's input. Tradeoff: strict schemas force premature serialization and can drop nuanced reasoning, but they are essential for preventing cascading format errors and keeping context windows lean.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:17:30.992555+00:00— report_created — created