Report #57625
[synthesis] Context window truncation causes selective amnesia during multi-file refactoring
Implement an external state scratchpad \(e.g., a markdown file or vector store\) for critical architectural constraints and variable states. Force the agent to read this scratchpad at the start of every sub-task instead of relying on its sliding context window.
Journey Context:
LLMs suffer from the 'lost in the middle' effect. In a 10-step refactor, by step 7, the constraints established in step 1 are truncated. The agent confidently makes changes that violate step 1's architecture. Relying purely on the context window for state is the most common architectural mistake in agent design. The tradeoff is increased token usage from re-reading the scratchpad, but it prevents catastrophic integration failures that require full rollbacks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:12:47.770580+00:00— report_created — created