subagent-reports-complete-but-pr-unmerged

Verifies PR merge state after sub-agents report task completion.

3|Updated May 8, 2026
One-click install
npx skills add https://github.com/wan-huiyan/agent-traffic-control --skill subagent-reports-complete-but-pr-unmerged-wan-huiyan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: subagent-reports-complete-but-pr-unmerged
Source: https://github.com/wan-huiyan/agent-traffic-control/tree/main/plugins/agent-traffic-control/skills/subagent-reports-complete-but-pr-unmerged
Command: npx skills add https://github.com/wan-huiyan/agent-traffic-control --skill subagent-reports-complete-but-pr-unmerged-wan-huiyan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Parallel sub-agents dispatched to open, review, and merge GitHub PRs often return a "completed" status while their PRs are still OPEN — CI was pending, a review finding was unaddressed, or the final merge step never ran. Parents that trust the completion notification silently leave PRs unmerged and issues open. ## Core Features & Use Cases - Completion verification protocol: On every sub-agent completion notification, run gh pr view <num> --json state,mergedAt,statusCheckRollup before marking any parent task done. - Four stopping-point taxonomy: Diagnose whether the agent stopped at CI-in-progress, an unaddressed P0/P1 review, a post-rebase push without merge, or a failed branch deletion, with a concrete recovery command for each. - Parent-side finalization: Finish trivial last steps (watch CI, add label, squash-merge, delete branch) directly in the parent instead of dispatching another sub-agent. - Use Case: You dispatch 4 background sub-agents to merge PRs closing GitHub issues; all 4 report completed, but verification shows 3 PRs still OPEN, so the parent watches CI and merges them, turning a 1/4 outcome into 4/4. ## Quick Start When a sub-agent reports a PR-merge task completed, ask the agent to verify the PR state with gh pr view and finish any missing merge steps before marking the task done.

Frequently Asked Questions about subagent-reports-complete-but-pr-unmerged

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why do sub-agents report completed before the PR is merged?▼

Sub-agents naturally terminate after kicking off their last asynchronous step, such as a CI watcher or push command, because their context is exhausted. The completion notification reflects context exhaustion, not orchestration completion, so the PR often remains OPEN.

How do I verify a sub-agent actually merged its pull request?▼

Run gh pr view <num> --json state,mergedAt,statusCheckRollup,labels,mergeable immediately when the completion notification arrives. Only mark the parent task done when state is MERGED with a non-null mergedAt value.

What should the parent do when a PR is still open after sub-agent completion?▼

Finish the missing step directly in the parent: watch CI with gh pr checks --watch, add required labels, then squash-merge with gh pr merge --squash --delete-branch. Dispatch a continuation agent only if substantive work like addressing a review finding remains.

Can better sub-agent briefs prevent premature completion reports?▼

Briefing agents to not declare completion until gh pr view returns MERGED reduces the gap but does not eliminate it, since context limits still force early termination. Always verify PR state in the parent regardless of brief quality.

When is this verification skill not needed?▼

It is unnecessary for single-agent workflows or tasks without asynchronous terminal steps like CI. Very simple PRs such as one-line fixes with no review findings are also more likely to merge cleanly without parent intervention.