v2.64.4
Compaction: reliable continuation, overflow recovery, and mid-turn compaction
Interrupted turns now resume exactly once after auto-compaction, context-filled truncations recover through the overflow path instead of failing loudly, and long tool loops compact before the provider limit without ever scheduling a second agent run.
What changed
- Continue-after-compaction fixed. A trailing assistant error message is now stripped unconditionally before the continuation decision, and dreb no longer schedules a competing
agent.continue()when the next request is already in flight (the user's prompt) or when the last assistant turn completed normally. Interrupted turns resume exactly once; completed turns finish quietly. - Context-filled truncation recovers. When response-length retries are exhausted and recorded usage is at or beyond the context window, the truncation is classified as a context overflow and takes the self-healing overflow path (strip error → compact → seamless retry). Genuine output-budget exhaustion below the ceiling still fails loudly.
- Mid-turn compaction. The compaction threshold is now also checked inside the running agent loop, before each LLM request, only when context is settled (every tool call has a matching result). Long tool loops compact in place and continue in the same loop instead of hitting the provider context limit.
- Auto-compaction serialized. A compaction check arriving while another compaction is in flight waits for it and re-evaluates afterwards (skipping if the context was already rebuilt, retrying if the previous run failed), so double compaction can no longer occur.
- K3 tier refresh everywhere. The K3 (Kimi 1M tier) context upgrade now also applies on the mid-turn and pre-prompt paths, not just at turn boundaries.