agent: make max_sessions default unlimited#547
Merged
Conversation
c88b7ff to
f95f404
Compare
Sessions on sprout-agent are cheap; the per-channel ACP harness already holds one session per active channel for the lifetime of that channel. A small numeric cap (previously 8) just turns into dead-letters when more channels than the cap go active, with no eviction policy in either side. Bots get bounced/restarted often enough that the unbounded growth in practice is negligible. Default to unlimited; the env var is still there for anyone who wants to clamp it.
f95f404 to
40b016d
Compare
This was referenced May 28, 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.
Sessions on
sprout-agentare cheap. The per-channel ACP harness holds one session per active channel for its lifetime, so a small numeric cap (previously 8) just dead-letters new channels once exceeded — neither side has eviction. Bots get restarted often enough in practice that unbounded growth isn't a real concern.Default
SPROUT_AGENT_MAX_SESSIONSto unlimited (usize::MAX). The env var is still honored for anyone who wants to clamp it.Supersedes the earlier harness-driven eviction approach on this branch — that work was reverted; this is the whole change now.
crates/sprout-agent/src/config.rs: default →usize::MAXcrates/sprout-agent/README.md: doc the new defaultNo code-path changes; the
>=cap check insession/newremains and simply never trips at the new default.