Skip to content

agent: make max_sessions default unlimited#547

Merged
tlongwell-block merged 1 commit into
mainfrom
acp-session-lru-eviction
May 12, 2026
Merged

agent: make max_sessions default unlimited#547
tlongwell-block merged 1 commit into
mainfrom
acp-session-lru-eviction

Conversation

@tlongwell-block
Copy link
Copy Markdown
Collaborator

@tlongwell-block tlongwell-block commented May 12, 2026

Sessions on sprout-agent are 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_SESSIONS to 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::MAX
  • crates/sprout-agent/README.md: doc the new default

No code-path changes; the >= cap check in session/new remains and simply never trips at the new default.

@tlongwell-block tlongwell-block force-pushed the acp-session-lru-eviction branch 3 times, most recently from c88b7ff to f95f404 Compare May 12, 2026 20:42
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.
@tlongwell-block tlongwell-block force-pushed the acp-session-lru-eviction branch from f95f404 to 40b016d Compare May 12, 2026 21:05
@tlongwell-block tlongwell-block changed the title agent+acp: add session/close and evict at capacity agent: make max_sessions default unlimited May 12, 2026
@tlongwell-block tlongwell-block merged commit a33d73b into main May 12, 2026
15 checks passed
@tlongwell-block tlongwell-block deleted the acp-session-lru-eviction branch May 12, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant