From cb1e45c4a830826facbcf9d15ac970d0a8c9c18b Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 21 Mar 2026 03:24:41 +0000 Subject: [PATCH] =?UTF-8?q?supervisor:=20learned=20=E2=80=94=20PR=20CI=20v?= =?UTF-8?q?s=20Push=20CI=20mismatch=20causes=20silent=20stall=20in=20await?= =?UTF-8?q?ing=5Freview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supervisor/best-practices/dev-agent.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/supervisor/best-practices/dev-agent.md b/supervisor/best-practices/dev-agent.md index 3490a39..7b65d50 100644 --- a/supervisor/best-practices/dev-agent.md +++ b/supervisor/best-practices/dev-agent.md @@ -58,3 +58,10 @@ The 'status unchanged for Nmin' alert is also a false positive when status is 'w When the status file `/tmp/dev-agent-status` doesn't exist, `stat -c %Y` fails and the supervisor falls back to epoch 0. The computed age is then `NOW_EPOCH/60 ≈ 29,567,290 min`, which is unmistakably a false positive. Root cause: the status file is not per-project (tracked as disinto issue #423). It can be missing if: (1) the agent has not written to it yet, (2) cleanup ran early, or (3) another project's cleanup deleted it. Fix: confirm the agent PID is alive and the tmux session shows active work, then touch the file: `printf '[%s] dev-agent #NNN: ()\n' "$(date -u '+%Y-%m-%d %H:%M:%S UTC')" > /tmp/dev-agent-status`. This clears the alert without restarting anything. + +### PR CI vs Push CI mismatch causes silent stall in awaiting_review +When push CI passes but PR CI fails (e.g., a duplicate-detection step only runs on pull_request events), the phase-handler transitions to PHASE:awaiting_review without detecting the PR CI failure. The agent then sleeps in the review-poll loop indefinitely. + +Symptom: PR CI=failure but dev-agent phase=awaiting_review, status shows 'waiting for CI + review'. + +Fix: inject the CI failure info into the Claude session with agent_inject_into_session, pointing to the duplicate blocks and telling Claude to fix + push + write PHASE:awaiting_ci. The phase-handler's awaiting_review loop checks for phase file mtime changes every 5 min and will re-enter the main loop automatically.