Skip to content

fix: chat rollover async ux - #551

Merged
edenreich merged 6 commits into
mainfrom
fix/chat-rollover-async-ux
May 29, 2026
Merged

edenreich merged 6 commits into
mainfrom
fix/chat-rollover-async-ux

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

edenreich added 3 commits May 29, 2026 03:56
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.
@edenreich
edenreich requested a review from a team as a code owner May 29, 2026 11:20
@edenreich edenreich changed the title fix/chat rollover async ux fix: chat rollover async ux May 29, 2026
@edenreich
edenreich merged commit af5fac9 into main May 29, 2026
@edenreich
edenreich deleted the fix/chat-rollover-async-ux branch May 29, 2026 11:36
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)
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.114.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant