Skip to content

fix(desktop): raise default warm backend pool cap from 3 to 8 - #102828

Open
kokhlo wants to merge 1 commit into
NousResearch:mainfrom
kokhlo:fix-102822-pool-cap-8
Open

kokhlo wants to merge 1 commit into
NousResearch:mainfrom
kokhlo:fix-102822-pool-cap-8

Conversation

@kokhlo

@kokhlo kokhlo commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Desktop's warm-backend pool capped concurrent spawned bot backends at 3 by default. On a multi-bot roster (the reporter runs 6: 1 remote + 5 local) the LRU cap evicts the least-recently-used idle backend as soon as a 4th is opened, so earlier bots pay a cold start every time they're revisited — matching the "ones I created first become no longer accessible until I re-prompt Hermes" report in #102822.

  • The pool was already fully configurable (Settings → Advanced "Warm Bot Backends", clamp range 1–64, HERMES_DESKTOP_POOL_MAX env fallback); only the default was stale — it preserved the original hard-coded ceiling from before multi-bot rosters were common.
  • Raised the default maxBackends 3 → 8 in both authoritative places: apps/desktop/electron/pool-limits.ts (main process: pool + persisted preference) and its hand-mirrored renderer copy apps/desktop/src/store/pool-limits.ts (Settings rows + prewarmProfileBackend saturation guard). Values already persisted in userData are untouched — users who lowered the cap keep theirs.
  • At ~60MB per warm backend the new default budgets ~480MB across 8 bots, in line with machines that run Desktop with a multi-bot roster; single-bot users still spawn exactly one backend — the cap only bounds concurrently warm ones.
  • Added a pinning test asserting the default stays a multi-bot-sized pool (>3), with a comment explaining the two mirrored constants must not drift.

Testing

  • npx vitest run electron/pool-limits.test.ts --project electron — 9 passed (incl. new pinning test)
  • npx vitest run electron/pool-spawn-coordinator.test.ts electron/pool-eviction.test.ts --project electron — 22 passed
  • npx vitest run src/store/profile.test.ts --project ui — 20 passed
  • npx tsc --build tsconfig.electron.json — exit 0
  • npx tsc -p . --noEmit (renderer) — exit 0
  • eslint on all three touched files — exit 0

Fixes #102822

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) area/profiles Multi-profile isolation, HERMES_HOME scoping labels Sep 4, 2026

@shellybotmoyer shellybotmoyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Clean 3-file fix (+16/-4) raising the warm backend pool cap from 3 to 8. Reasonable default for desktop use cases where multiple model providers may be configured. Straightforward config improvement.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/profiles Multi-profile isolation, HERMES_HOME scoping comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Desktop backend cap set at 3 bots, should be higher.

3 participants