Report #6380
[agent\_craft] Conversation history exceeds context window mid-task, causing loss of critical initial instructions
Implement sliding window with 'anchor' retention: always keep system prompt \+ first user message \(task definition\) \+ last N turns; summarize evicted middle turns into a 'progress checkpoint' stored in working memory
Journey Context:
Simple sliding windows lose the original task specification or the 'golden path' established early. The 'anchor' approach \(inspired by LangChain's ConversationBufferWindowMemory with initial\_message\_retention\) preserves the task boundary. The summary of middle turns prevents loss of context from evicted turns. Alternative \(full context until overflow\) causes abrupt truncation at random points; alternative \(no anchors\) loses task scope and user constraints.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:52:34.758236+00:00— report_created — created