You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Session rollover bypasses compaction backoff and rolls over on a failed summary #1592
Session rollover (internal/conversation/session_rollover.go) runs at the top of every headless turn and compacts with force=true, which bypasses the backoff added in #1584, and it rolls the session over even when the summary failed. Its gate also estimates over a different message set than it compacts. Split out of #1586, where this explains the force: true on every auto compaction and the five compaction_started in six minutes.
Steps to Reproduce
Run infer headless with compact.enabled: true, a model with a known context window and a conversation past auto_at percent of it.
Make the summary request fail (for example an unreachable summary model).
Watch the next turns.
Expected Behavior
One compaction_started, one compaction_failed, then the backoff from #1584 holds for buffer_size turns. No new session is created while the summary fails.
Actual Behavior
maybeRolloverSession (internal/agent/loop/utils.go) calls PerformRollover every turn, which calls OptimizeMessages(messages, model, true). The !force guard in OptimizeMessages skips inBackoff(), so the summary is retried on every turn.
PerformRollover ignores whether the optimizer reduced anything. On failure it logs "optimizer returned no reduction, copying messages as-is", still calls StartNewConversation and copies the full history into the new session, so each failed attempt also churns the session and the group index.
Activity
inference-gateway-releaser commentedon Oct 20, 2026
🎉 This issue has been resolved in version 0.234.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
feat(conversation): add compact.strategy pointer mode (#1629)