Report #30103
[synthesis] Agent forgets to output JSON or follow format at the end of a long run
Place the most critical formatting instructions at both the beginning and the end of the system prompt, and enforce structured output \(JSON mode\) rather than prompt-based formatting.
Journey Context:
The Lost in the Middle effect means instructions placed in the middle of a long context are ignored. As the agent accumulates context, the system prompt gets pushed further from the generation window. Teams test with short contexts and it works. In prod, with long contexts, it fails. The fix is structural \(JSON mode\) or positional \(bookending\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:54:59.787511+00:00— report_created — created