Report #1600
[agent\_craft] Agent loses track of initial instructions or early context as the conversation grows \(Context Rot\)
Implement a rolling compaction loop that summarizes the conversation history, but explicitly re-injects the original system prompt and current task objective at the top of the newly compacted context window.
Journey Context:
LLMs suffer from 'lost in the middle' degradation. Simply appending context causes early instructions to be ignored. Naive summarization loses the original constraints. Re-injecting the core directive after compaction ensures the agent stays aligned with the root goal rather than drifting into a summary of its own past actions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T04:31:50.784330+00:00— report_created — created