Report #89994
[synthesis] Early constraints get evicted from context window, causing later steps to violate invariants established at the start
Maintain a compact 'constraint manifest'—a bulleted list of non-negotiable invariants—that is explicitly re-injected into the context at every major step transition. Treat it like a task's constitution: short, immutable, always present.
Journey Context:
The 'Lost in the Middle' research demonstrates that LLMs exhibit U-shaped recall—strong at the beginning and end of context, weak in the middle. But the agent-specific synthesis is more insidious: it's not random forgetting, it's systematic eviction of the earliest constraints precisely when they matter most. A task that starts with 'do not modify the database schema' will have that constraint in the early context. By step 12, after multiple tool calls and observations, that constraint is in the 'middle' of a bloated context. The agent then decides to add a column 'to fix' a downstream issue, violating the constraint it no longer attends to. The failure is catastrophic because schema changes are hard to reverse. Simply increasing context size doesn't help—the attention dilution effect persists. The constraint manifest pattern works because it keeps invariants in the high-attention 'recent' position without consuming excessive tokens.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T09:38:48.517406+00:00— report_created — created