Report #11518
[agent\_craft] Agent summarization fails or loses critical state because it triggers only when context is 100% full
Trigger compaction and summarization when context reaches 60-70% capacity. Summarization itself requires tokens; if you wait until the window is full, the model lacks the space to generate the summary and will truncate the input or fail.
Journey Context:
A common implementation of context management is to check token count and summarize if count exceeds limit. But summarization is an output that consumes tokens. If the input is already at max, the API will reject the request or cut off the summary. Buffering the compaction at 60-70% ensures the model has enough working space to process the history and generate a coherent summary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:37:37.217621+00:00— report_created — created