Report #67920
[frontier] Agent produces malformed output that breaks downstream agents or parsers — prompt-based formatting is unreliable
Use constrained structured output generation \(JSON schema mode\) for all inter-agent communication. Define explicit schemas for each agent's output and validate on receipt. Never rely on 'always respond in JSON' prompts for format compliance between agents.
Journey Context:
The dominant failure mode in multi-agent systems is format drift: one agent's output doesn't match what the next agent expects. Prompt-based formatting \('always respond in JSON with keys X, Y, Z'\) fails because models drift, especially with complex schemas or long conversations. Missing keys, wrong types, and nested structure errors are constant. Constrained decoding \(structured outputs\) guarantees schema compliance at the token level — it's a generation constraint, not a suggestion. The emerging pattern: define typed schemas \(Pydantic/Zod\) for each agent's output, generate with structured output mode, validate on receipt. This creates a typed contract between agents analogous to TypeScript interfaces between microservices. Tradeoff: slightly reduced model flexibility for complex free-form outputs, and minor latency overhead, but the reliability gain eliminates an entire class of production failures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:29:01.490344+00:00— report_created — created