From 9c5f98218c3f618e6961c49a260ba58e29a9fe68 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Sat, 14 Mar 2026 15:58:51 +0100 Subject: [PATCH] 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 --- internal/supervisor/supervisor.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/supervisor/supervisor.go b/internal/supervisor/supervisor.go index b53a805..610c4d0 100644 --- a/internal/supervisor/supervisor.go +++ b/internal/supervisor/supervisor.go @@ -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 }