← ClaudeAtlas

subagent-reports-complete-but-pr-unmergedlisted

Catch the systematic gap between sub-agent "completed" status and the actual end state of a PR-merge orchestration task. Use when: (1) you've dispatched multiple parallel sub-agents (general-purpose or specialist) to open + review + merge PRs, (2) the parent receives `<task-notification>` with `status: completed` but the sub-agent's last action was waiting on CI, addressing a review finding, or pushing a rebased branch, (3) you're tempted to mark the parent task done based on the completion notification alone, (4) the parent has a TaskList tracking PR closure and you'd silently leave PRs OPEN. Root cause: sub-agents naturally terminate when they've kicked off the last asynchronous step (CI watcher, push command, reviewer dispatch), even if their brief required them to wait for that step's terminal state and then perform a follow-up (label, merge, delete-branch). The completion notification reflects sub-agent CONTEXT exhaustion, not orchestration COMPLETION. Observed 4/4 in one session. Fix: parent always runs
wan-huiyan/agent-traffic-control · ★ 2 · AI & Automation · score 79
Install: claude install-skill wan-huiyan/agent-traffic-control
# Sub-Agent Reports "Completed" While PR Is Still OPEN ## Problem You dispatch 3-5 parallel sub-agents to open + review + merge PRs that close GitHub issues. Each agent's brief explicitly says "wait for green CI, add `auto-deploy` label, squash-merge, delete branch, verify issue auto-closes." The agents work, push PRs, then return `<task-notification status: completed>`. Several of those PRs are still OPEN. CI was still in-progress when the agent terminated. Or a reviewer found a P1 and the agent fixed it but stopped before re-running CI. Or the agent post-rebased and pushed but didn't merge. The parent, reading "completed," marks its TaskList task done. Hours later you realize 3 of 5 PRs never landed. This is **systematic**, not occasional. In one session (`scan-bugs-parallel`, 2026-05-08, this repo) **4 of 4** sub-agents stopped before final merge: - Wave1-G PR #527: agent posted P1 review, then stopped. Parent had to dispatch a continuation agent to fix + merge. - Wave1-E PR #528: agent's final summary "Now I'll continue with the rest of the workflow (CI, auto-deploy label, merge)" — but the message ended there. PR was OPEN with green CI. Parent merged. - Wave2 PR #540: agent merged successfully on its own (the exception). But it had to mid-flight rebase, which exposed the timing fragility. - Wave2 PR #544: agent stopped after pushing the post-rebase branch but before CI completed. Parent merged. ## Trigger Conditions Apply this skill when: - You've used `Agent` to