feat(DIS-104): global semaphore for max_concurrent_agents cap #44
No reviewers
Labels
No labels
blocked
needs-review
phase:0
phase:1
phase:1.5
phase:2
phase:3
phase:4
phase:5
phase:6+
priority:p0
priority:p1
priority:p2
security
type:chore
type:ci
type:docs
type:feat
type:fix
type:idea
type:known-issue
type:refactor
type:test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: dev/disclaw#44
Loading…
Reference in a new issue
No description provided.
Delete branch "phase-1/concurrency-semaphore"
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?
Summary
Semaphoreclass insrc/runtime/concurrency.ts(pure TypeScript, no new deps)runAgent()inrunner.tsacquires a slot before spawning Claude CLI and releases it infinallymax_concurrent_agentsadded toDisclawConfig(default 4), configurable indisclaw.yamltests/unit/semaphore.test.tscovering happy path, queueing, FIFO order, and error-path releaseTest plan
npm run build� TypeScript compiles without errorsnpm test� all 40 tests pass (8 test files)finallyblock guarantees release even when the spawn rejects