Report #75864
[synthesis] System prompt instructions forgotten in long multi-turn agent conversations
For Claude, use XML tags to encapsulate the primary task and refer back to them \('Refer to the for all steps'\). For GPT-4o, periodically inject a summary of the original system prompt into the \`assistant\` or \`user\` turn every 5-6 messages. For Gemini, keep conversations short and use cached system instructions.
Journey Context:
Context window \!= context retention. Claude suffers from 'lost in the middle' but strongly respects XML boundaries at the start/end of prompts. GPT-4o's attention mechanism decays on system prompts over long turns, requiring mid-conversation reinforcement \(which developers often avoid due to token cost, but is necessary for retention\). Gemini's context retention drops sharply after ~8-10 turns unless the system instruction is cached and heavily weighted. A single long system prompt works on turn 1 but fails by turn 10 across all models, requiring distinct reinforcement strategies.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T09:55:44.618363+00:00— report_created — created