Report #76135
[synthesis] Agent silently shifts tool output format breaking downstream parsers
Use schema-constrained generation \(JSON mode / structured outputs\) for every inter-agent communication and tool output parsing, and decouple the agent's internal scratchpad from its structured output interface.
Journey Context:
Agents often start returning well-formatted JSON, but as the context gets longer or the task gets harder, they start injecting helpful prose \(e.g., Here is the JSON you requested: \`\`\`json...\) or subtly changing key names. Downstream parsers expecting strict JSON fail silently or throw unhandled exceptions. Developers try to prompt ONLY RETURN JSON, NO PROSE, which works 90% of the time but fails exactly when the task is hardest. The synthesis is that LLMs have two distinct modes: reasoning and interfacing. The interface layer must be mechanically constrained \(e.g., via grammar/JSON mode\), while the reasoning layer must be free-form.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:22:54.807872+00:00— report_created — created