Request an automated reviewer on a GitHub pull request using the Copilot → Codex + Claude fallback chain.
A PR number. Detect it from context (e.g. recent gh pr create output, current branch PR) or ask the human: “Which PR number should I request a review for?”
Try Copilot first.
gh pr edit {number} --add-reviewer "Copilot"
If that command exits non-zero, inspect the error output:
"Could not resolve to a User", "not found", "is not a collaborator", "does not have access" — these signal that Copilot is permanently not configured on this repo. Fall through to Step 3.Fall back to @codex and @claude review comments.
Post both trigger comments:
gh pr comment {number} --body "@codex review"
gh pr comment {number} --body "@claude review"
Both are best-effort. Each bot must be installed and enabled on the repo for the comment to queue a review — gh exits 0 regardless of whether a review was actually queued. Inform the human of this uncertainty for each.
If Step 3 fails (i.e. either gh pr comment exits non-zero), warn the human about the failure and stop.
Report the outcome clearly:
@codex review and @claude review on PR #{number} — reviews will be queued if the respective bots are installed.” — if Step 3 was used.