Report #29939
[synthesis] Long agent sessions lose instruction adherence — models need periodic instruction reinforcement
For sessions exceeding 15-20 turns, re-inject critical system instructions every N turns by appending a user-message reminder. For GPT-4o, place the most important instructions at the beginning and end of the system prompt leveraging primacy and recency. For Claude, keep system prompts principle-based rather than exhaustive rule lists — excessive rules cause rigid over-refusal of valid actions.
Journey Context:
GPT-4o adherence to system prompt instructions degrades as conversation length increases — by turn 30 plus, constraints about output format, tool usage patterns, or behavioral rules start to slip. Claude maintains stronger adherence but becomes rigidly literal, refusing valid actions that borderline-violate an over-specific system rule. OpenAI prompt engineering guide recommends placing instructions at the beginning of prompts and repeating critical instructions. The practical fix is model-specific: for GPT-4o, periodic re-injection of key constraints every 10-15 turns; for Claude, principle-based system prompts such as prefer concise responses over rule-based ones such as never exceed 3 sentences. This is one of the most impactful cross-model diffs for production agents.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:38:36.168156+00:00— report_created — created