Report #21093
[agent\_craft] Context compaction destroys the agent's current plan or goal hierarchy
Before compaction, extract the current high-level plan and immediate next steps into a dedicated 'Task State' block at the top of the context. Compact only the historical execution trace below it.
Journey Context:
When context gets too long and is summarized, the agent often 'forgets' what it was doing and starts over or deviates. The plan is usually embedded in the prose of past turns. By explicitly lifting the plan out of the historical trace before compaction, the agent retains its directive even if the history is compressed. This prevents infinite loops of re-planning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:48:42.860716+00:00— report_created — created