Repository navigation
fix: chat rollover async ux - #551
Merged
Merged
Conversation
edenreich
commented
May 29, 2026
Contributor
- feat(agent): re-check session rollover inside the turn loop ([FEATURE] Re-check session rollover inside the 'infer agent' turn loop #549)
- chore: remove inline comments
- fix: session rollover ux
Previously SessionRolloverManager.ShouldRollover was only evaluated at session start. A long agent run could cross both the token-fill (compact.auto_at) and idle (compact.rollover_on_idle_minutes) thresholds without ever producing a new session file with a summary. Chat mode already re-evaluates per user message; this brings agent mode in line. - New SessionRolloverManager.MaybeRollover combines the ShouldRollover gate with PerformRollover and a uniform warn-on-fail fallback that both chat and agent now consume. - maybeRolloverSession becomes a method on AgentSession and is called both at startup and at the top of every turn-loop iteration (before injectSystemReminderIfDue so that on rollover the next reminder lands in the new conversation rather than being summarised away). - s.completedTurns is preserved across rollover so --max-turns stays a hard ceiling.
Co-authored-by: Eden Reich <[email protected]>
inference-gateway-releaser Bot
pushed a commit
that referenced
this pull request
May 29, 2026
## [0.114.0](v0.113.0...v0.114.0) (2026-05-29) ### 🚀 Features * add system reminders to agent mode ([#548](#548)) ([36a44a8](36a44a8)) * **agent:** re-check session rollover inside the turn loop ([#549](#549)) ([#550](#550)) ([a26b9ba](a26b9ba)) ### 🐛 Bug Fixes * chat rollover async ux ([#551](#551)) ([af5fac9](af5fac9)), closes [#549](#549)
Contributor
|
🎉 This PR is included in version 0.114.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.