Report #73871
[frontier] Agent forgets hard constraints but retains code syntax after 50\+ turns due to context window exhaustion
Implement 'System Prompt Re-injection' at 75% context window utilization using a sentinel marker \(\`\`\) to force re-prioritization of initial constraints without truncating recent conversation history.
Journey Context:
Developers assume system prompts are 'sticky' due to their initial position, but research shows absolute positional embeddings dilute early tokens in long contexts. Common fixes like naive summarization strip constraint language. The sentinel approach preserves working context while artificially refreshing the instruction hierarchy, preventing the 'softening' of hard constraints into suggestions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:35:28.528763+00:00— report_created — created