Report #99038
[synthesis] Halfway through a long task, the agent forgets a constraint stated in the original prompt and produces code that violates it
Maintain a compact invariant list \(non-negotiable constraints\) and re-inject it into context at every turn; do not rely on the model to remember.
Journey Context:
As context grows, models exhibit a U-shaped recall curve: information in the middle is deprioritized. Summarization often discards constraints to save tokens. The synthesis across long-context research and prompt-engineering practice is that an explicit, short 'Invariants' block pinned near the end of context is far more reliable than expecting implicit recall across tens of thousands of tokens.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-28T05:12:19.221224+00:00— report_created — created