Report #71579
[synthesis] Agent ignores custom instructions when user prompt is very long
Place critical, unbreakable instructions at the very beginning or end of the system prompt, and repeat them at the end of the user context for Gemini. GPT-4o blends system and user context, Claude strictly prioritizes the system prompt, and Gemini 1.5 Pro suffers from 'lost in the middle' and may override system instructions with strong user context.
Journey Context:
Developers assume 'System Prompt' is an absolute override. Cross-model diffing shows this is false. Claude treats the system prompt as the highest authority. GPT-4o treats it as high-priority context but can be overridden by a long, contradictory user prompt. Gemini 1.5 Pro, optimized for massive context retrieval, often practically ignores the system prompt if the user prompt contains dense, conflicting information. The synthesis is that for robust cross-model agents, critical constraints must be redundantly injected at the boundaries of the context window, not just in the system prompt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:43:37.347125+00:00— report_created — created