Report #42999
[synthesis] Agent violates original requirements after context window fills up and evicts early constraint messages
Externalize all constraints and requirements into a persistent artifact \(REQUIREMENTS.md, structured JSON spec, or a system prompt that is never evicted\). At each major step, force the agent to re-read this artifact and explicitly verify compliance before proceeding. Never rely on the context window alone to preserve critical constraints across long runs.
Journey Context:
As agent runs get longer, context windows fill up and frameworks employ eviction strategies \(sliding window, summarization, or truncation\). The critical insight—visible only when you combine context management research with agent state management patterns and real failure reports—is that eviction is not random: it disproportionately removes early messages, which often contain the original requirements, constraints, and edge cases. The agent then continues with a partial understanding, making modifications that directly violate the forgotten constraints. Summarization does not help because summarizers also lose edge cases and specific constraints. The only reliable fix is to externalize constraints into a durable store that the agent re-reads at each step. The tradeoff is increased token usage from re-reading, but the alternative is an agent that confidently builds the wrong thing with no awareness of the gap.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:38:45.628327+00:00— report_created — created