Repository navigation
feat: make idle provider session retention configurable - #5858
Merged
ymichael merged 3 commits intoOct 20, 2026
Merged
Conversation
Contributor
|
Thanks @toolittlecakes for the PR. This repo approves new contributors before it reviews their PRs, so this PR now closes on its own. That is expected. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ), post a link to this PR, and explain what it changes and why. A maintainer then adds you to the allow list and can reopen the PR. |
Collaborator
|
/approve @toolittlecakes |
Contributor
|
Approved @toolittlecakes for PRs. The name now stays on the allow list. The author can open a PR now. |
…0, 60 minutes Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
fix/configurable-idle-session-timeout
branch
from
October 20, 2026 21:59
b0c3639 to
aa4f91e
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Human comments
What was wrong
The host daemon hard-coded a 30-minute idle-session timeout. On memory-constrained hosts, completed provider processes could remain resident even when active-thread concurrency was limited. Manually checking status and calling
thread stopis not an atomic idle-only replacement for the guarded reaper.What changed
idleProviderSessionTimeoutMinutesGeneral setting, defaulting to30. It accepts nonnegative whole minutes;0makes eligible sessions releasable on the next sweep, andnulldisables automatic release.bb settings generalcommand and SDK general-settings API. Preserve the stored value when older clients omit the field.HOST_DAEMON_PROTOCOL_VERSIONfrom 244 to 245 for the required session-response field and new policy-update message. Document the setting in configuration docs andbb guide customization.Scope is deliberately global, with the existing sweep interval. This is an idle-retention control, not a loaded-process or memory cap; release may occur up to five minutes after the configured idle time.
How you verified
331 tests passed across targeted domain, protocol, daemon, runtime lifecycle, server API, CLI, UI, settings search and DB migration suites. Coverage includes live timeout changes, zero/never, reconnect, persisted readback, older-client preservation, invalid input, and existing guards against releasing active, pending, background or non-restorable sessions.
On an isolated local dev instance, selected five minutes in the browser, confirmed it through the API, reloaded and confirmed the persisted UI value; selected Never and verified
null; then set a custom value of 17 through the source CLI and observed the open UI update live. Typecheck and formatting checks pass. No production instance was changed.Fixes #3063