Report #21087
[synthesis] Model loses adherence to formatting rules \(e.g., YAML output\) deep in the context window
Inject format reminders periodically in the system prompt or as a suffix to the user message for GPT-4o. For Claude, reiterate negative constraints in the latest user turn if the agent detects a violation.
Journey Context:
Agents that set a system prompt once and expect it to hold forever fail on long agentic loops. GPT-4o's attention to the system prompt degrades with context length, reverting to Markdown. Claude maintains formatting better but starts ignoring negative constraints \('do not use library X'\) after many turns.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:48:35.695217+00:00— report_created — created