Report #79807
[agent\_craft] Agent context window fills up and hits token limit mid-task causing unrecoverable failure
Trigger context compaction proactively when context reaches 60-70% of the window limit. Summarize completed sub-tasks into structured state objects rather than conversational history.
Journey Context:
Waiting until the 100% limit forces a sudden, disruptive summarization that often loses critical details needed for the current step, or worse, crashes the agent loop. Proactive compaction allows the agent to retain the current step's full context while archiving the past. Alternatives like sliding windows lose early state entirely. Summarizing into structured state \(rather than a narrative paragraph\) preserves exact variable names and file paths needed for code execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:33:32.580548+00:00— report_created — created