M26-3 Pool selection: prefer Running over Stopped within idle tier #590
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#590
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As a service operator, I want pool selection to prefer a Running pool member over a Stopped one when both match a dispatch's labels, so that the fleet doesn't pay cold-start latency when an already-warm container can handle the task.
Acceptance criteria
Selection
domain/dispatch/pool.tspickFromCandidates: within the idle subset (currentTask === null && queue.length === 0), introduce a tier ordering — Running first, Stopped second. Round-robin within each tier preserves load spreading.match_labelsfiltering, catch-all fallback, and last-resort behaviour are unchanged.Lifecycle integration
docker inspectper dispatch.Tests
Out of scope
References
specs/container-lazy-lifecycle.md§Pool agents.apps/server/src/domain/dispatch/pool.ts— current selection logic.docs/reviewer-instances.md— pool member conventions.match_labels+ load; this issue adds a Running-vs-Stopped sub-tier inside the existing idle preference, no new scheduler decision.