Report #51789
[agent\_craft] When to trigger context summarization to prevent data loss
Trigger compaction/summarization based on token count thresholds \(e.g., at 70% context capacity\) rather than turn counts, and ensure the summarization prompt preserves pending tasks and constraints.
Journey Context:
Turn-based summarization is brittle because a single turn can consume 10k tokens \(reading a file\) or 10 tokens. Token-based triggers prevent out-of-memory errors. However, naive summarization often drops the 'what's left to do' state. The summarizer must be explicitly instructed to carry over the task list and any hard constraints, trading a slight overhead in summarization calls for reliable task completion.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:25:11.900774+00:00— report_created — created