Report #54351
[synthesis] Agent violates initial constraints after context window fills up
Inject invariant checks as system-level validators at every tool call boundary, rather than relying on the LLM to remember instructions from the top of the prompt.
Journey Context:
As context length increases, LLMs suffer from the 'lost in the middle' phenomenon and sliding window truncation drops early system prompts. Agents will confidently execute actions that directly violate Step 1 rules by Step 10 because the rule has been evicted from the active context. Relying on the model's memory is a failed strategy; state validation must be externalized to deterministic code that executes outside the context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:43:36.267866+00:00— report_created — created