Report #78742
[agent\_craft] Agent compacts/summarizes context too early, losing recent fine-grained details, or too late, causing context overflow errors
Trigger compaction based on a percentage of the context window used \(e.g., 70-80%\), and always summarize the oldest turns while keeping the most recent N turns verbatim.
Journey Context:
Summarizing too early wastes the context window and loses detail. Summarizing too late risks hitting the hard token limit and crashing the agent run. A percentage-based trigger \(like 75% full\) provides a buffer. Crucially, never summarize the most recent 2-3 turns, as they contain the immediate state and the exact output of the last tool call. Summarize the distant past, keep the recent past verbatim.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:45:58.243277+00:00— report_created — created