mirror of
https://github.com/instructkr/claw-code.git
synced 2026-10-28 00:05:50 +08:00
TeamCreate resolves maxConcurrentAgents from the per-team input, then the maxConcurrentAgents setting, then unlimited (pre-fix behavior). The cap is persisted in the manifest and registered on a process-wide gate; agent threads still spawn immediately but block on an RAII slot before entering their run loop, so manifest/task-claim semantics are unchanged. TeamDelete forgets the gate so queued agents drain and no stale team entries accumulate. Includes a gate regression test.