fix: auto-close issues when dev-agent detects already_done

Previously the agent unclaimed the issue but left it open, causing
an infinite claim/refuse/unclaim loop on every poll cycle.
This commit is contained in:
openhands 2026-03-17 09:38:08 +00:00
parent bff73ebcf7
commit 9445e36a1e

View file

@ -832,7 +832,14 @@ A maintainer should split this issue or add more detail to the spec."
${REASON}
This issue may be ready to close."
Closing as already implemented."
# Close the issue to prevent retry loops
curl -sf -X PATCH \
-H "Authorization: token ${CODEBERG_TOKEN}" \
-H "Content-Type: application/json" \
"${API}/issues/${ISSUE}" \
-d '{"state":"closed"}' >/dev/null 2>&1 || true
;;
*)
log "unknown refusal status: ${REFUSAL_STATUS}"