From c096373ef6ab8fd8907b80ea2fba53e89383e9d2 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 10 Apr 2026 12:14:36 +0000 Subject: [PATCH] fix: bug: dev-poll exits early when another agent has any in-progress issue, blocking parallel agents from claiming backlog (#572) Co-Authored-By: Claude Opus 4.6 (1M context) --- dev/dev-poll.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dev/dev-poll.sh b/dev/dev-poll.sh index 6020294..d056b64 100755 --- a/dev/dev-poll.sh +++ b/dev/dev-poll.sh @@ -426,6 +426,7 @@ ORPHANS_JSON=$(curl -sf -H "Authorization: token ${FORGE_TOKEN}" \ ORPHAN_COUNT=$(echo "$ORPHANS_JSON" | jq 'length') BLOCKED_BY_INPROGRESS=false +OTHER_AGENT_INPROGRESS=false if [ "$ORPHAN_COUNT" -gt 0 ]; then ISSUE_NUM=$(echo "$ORPHANS_JSON" | jq -r '.[0].number') @@ -478,13 +479,13 @@ if [ "$ORPHAN_COUNT" -gt 0 ]; then fi else log "issue #${ISSUE_NUM} assigned to ${assignee} — their thread, not blocking" - BLOCKED_BY_INPROGRESS=true - # Issue assigned to another agent — don't block, fall through to backlog + OTHER_AGENT_INPROGRESS=true + # Issue assigned to another agent — skip stale checks but fall through to backlog fi fi - # Only proceed with in-progress checks if not blocked by another agent - if [ "$BLOCKED_BY_INPROGRESS" = false ]; then + # Only proceed with in-progress checks if not blocked by this agent's own work + if [ "$BLOCKED_BY_INPROGRESS" = false ] && [ "$OTHER_AGENT_INPROGRESS" = false ]; then # Check for dev-agent lock file (agent may be running in another container) LOCK_FILE="/tmp/dev-impl-summary-${PROJECT_NAME}-${ISSUE_NUM}.txt" if [ -f "$LOCK_FILE" ]; then