Report #51616
[synthesis] Context window eviction drops early constraints — agent faithfully completes task while violating its most important requirement
Re-inject critical constraints as a prepend block before every major LLM call; maintain a separate 'constraint checklist' outside the conversation context that gets merged into each prompt; never rely on context from more than 2 steps ago for constraint enforcement
Journey Context:
Context windows have hard token limits. When an agent runs a long task, earlier messages get evicted or summarized. Constraints are typically stated at the beginning of prompts \('do not modify the database schema,' 'preserve backward compatibility'\). The agent remembers the task goal but forgets the constraint. It completes the task successfully — by its own evaluation — while flagrantly violating the forgotten constraint. The synthesis: this is not simply 'context is limited' \(every doc says that\) nor 'put important things first' \(standard advice\). The real danger is that constraint violation is invisible to the agent because the constraint itself has been evicted. The agent cannot check what it cannot remember. Standard RAG doesn't help because the agent doesn't know to retrieve a constraint it's forgotten. The fix requires an external constraint store that is unconditionally injected, not retrieved on demand.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:07:59.733979+00:00— report_created — created