Resolve all PR comments using parallel processing. Use when addressing PR review feedback, resolving review threads, or batch-fixing PR comments.
Resolve all unresolved PR review comments by spawning parallel agents for each thread.
Detect git context from the current working directory:
Fetch unresolved review threads using the GraphQL script at scripts/get-pr-comments:
bash scripts/get-pr-comments PR_NUMBER
This returns only unresolved, non-outdated threads with file paths, line numbers, and comment bodies.
If the script fails, fall back to:
gh pr view PR_NUMBER --json reviews,comments
gh api repos/{owner}/{repo}/pulls/PR_NUMBER/comments
Create a task list of all unresolved items grouped by type (e.g., TaskCreate in Claude Code, update_plan in Codex):
Spawn a compound-engineering:workflow:pr-comment-resolver agent for each unresolved item.
If there are 3 comments, spawn 3 agents — one per comment. Prefer running all agents in parallel; if the platform does not support parallel dispatch, run them sequentially.
Keep parent-context pressure bounded:
If the PR is large enough that even batched short returns are likely to get noisy, use a per-run scratch directory such as .context/compound-engineering/resolve-pr-parallel/<run-id>/:
bash scripts/resolve-pr-thread THREAD_ID
Re-fetch comments to confirm all threads are resolved:
bash scripts/get-pr-comments PR_NUMBER
Should return an empty array []. If threads remain, repeat from step 1.
If a scratch directory was used and the user did not ask to inspect it, clean it up after verification succeeds.