Report #71039
[agent\_craft] Agent hits context window limits during long tasks, losing the original goal
Implement rolling compaction: when context reaches 70% capacity, summarize the oldest turns into a structured 'Task Progress' block, preserving the original goal and key decisions, then drop the raw turns.
Journey Context:
Naive truncation drops the original goal. Full summarization is expensive. A structured rolling summary preserves the 'why' \(intent\) and 'what' \(state\) while discarding the 'how' \(raw tool output\). This ensures the agent never loses the plot while keeping token usage manageable.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:49:13.696687+00:00— report_created — created