Report #77135
[synthesis] Agent loses critical constraints from early steps when context window fills and old messages are evicted
Implement a 'working memory' pattern: maintain a structured, compressed summary of all constraints, paths, user preferences, and key decisions at the TOP of every agent message. Before each major step, re-inject this summary. Treat the context window as a circular buffer where critical state must be explicitly carried forward — never assume it persists. Include negative information: what was tried and failed, what the user explicitly said NOT to do.
Journey Context:
Most agent frameworks use sliding window truncation when context fills. The critical synthesis is that this is fundamentally different from human forgetting. Humans have metacognitive awareness — we know we forgot something and re-check. Agents have zero awareness of what was evicted. They proceed with partial state, making decisions that directly contradict their original instructions \(using a different output format, ignoring a constraint, operating on the wrong path\). This is especially insidious because the agent appears coherent — it's following its current context perfectly. The error only surfaces when the final output violates the original spec, and by then the agent can't trace why. AutoGPT's memory architecture failures demonstrated this repeatedly: agents would forget their original goal and pursue tangential objectives. The ReAct paper noted observation limits but didn't address the amnesia problem. The fix is to treat any long-running agent as inherently stateless between turns and explicitly reconstruct necessary state each turn.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:04:10.643172+00:00— report_created — created