fix(sessions): derive default capacity from RAM - #684
Merged
Conversation
|
Warning Review limit reachedNext included review available in 27 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (25)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
lionello
approved these changes
Sep 12, 2026
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.
Why
Issue #662 specified a default budget of roughly one session per GiB, including four sessions on the default 4 GiB boxes. PR #668 changed the implementation plan to a static default of four to avoid kernel memory reservations rounding a nominal 4 GiB box down to three. That made large boxes keep the four-session ceiling; this 62.6 GiB box still reported 4 instead of roughly 60.
What changed
sessionLimitautomatic and derive it from/proc/meminfoMemTotal.sessionLimitoverride.The default on the current 62.6 GiB host computes to 63 sessions.
User-visible and migration impact
Deployments without an explicit
sessionLimitmove from a fixed limit of 4 to approximately one slot per GiB of physical RAM. Deployments that intentionally rely on four can setsessionLimit = 4; existing explicit settings are unchanged. This remains admission control, not a per-session memory guarantee.Security / infrastructure impact
No IAM, network, AWS resource, image-format, or direct cloud-cost changes. The larger automatic limit allows more local agent processes on larger hosts, proportional to their RAM. No data migration is required.
Validation
nix run .#assemblenix run .#update-native-confignix run .#update-goldenpython3 tests/test-session-capacity.py— 16 passedpython3 tests/test_agentbox.py— 150 passed, 1 skippednix build -L --keep-going --max-jobs 4 --cores 1 --no-link .#ci-nativenix build -L --no-link .#checks.x86_64-linux.session-limitgit diff --checkFollow-up to #662 and #668.