supervisor: exclude in_progress beads from assignment candidates

GetReadyWork returns both open and in_progress by default. Only open
unassigned beads should be offered to idle sessions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Levi Neely 2026-03-14 15:58:51 +01:00
parent 21450ba02c
commit 9c5f98218c
1 changed files with 6 additions and 1 deletions

View File

@ -40,9 +40,14 @@ func (s *Supervisor) assignWork() {
return
}
// Filter for unassigned tasks
// Filter for open, unassigned tasks only.
// GetReadyWork returns both open and in_progress; we only want open
// since in_progress beads are already being worked on.
claimable := []map[string]interface{}{}
for _, bead := range beads {
if status, ok := bead["status"].(string); !ok || status != "open" {
continue
}
if assignee, ok := bead["assignee"].(string); ok && assignee != "" {
continue
}