ao review-check command scans open pull requests for pending review comments and automatically sends agents messages to address them. This is useful for proactively handling review feedback without manual intervention.
Syntax
Arguments
Project ID to check. If omitted, checks all projects.
Options
Show what would be done without actually sending messages to agents
How It Works
The command performs these steps:- Fetch sessions - Lists all sessions for the specified project (or all projects)
- Filter PRs - Identifies sessions with open pull requests
- Check reviews - Queries GitHub GraphQL API for each PR to check:
- Review decision (APPROVED, CHANGES_REQUESTED, etc.)
- Unresolved review threads
- Notify agents - Sends a message to each agent with pending reviews
Review Detection
A session is considered to have pending reviews if either:- The PR has a
CHANGES_REQUESTEDreview decision - The PR has one or more unresolved review threads
Message Format
When reviews are detected, the command sends this message to the agent:Examples
Check all projects
Check a specific project
frontend project.
Dry run to preview actions
Output
Sessions with pending reviews
No pending reviews
Implementation Details
GraphQL Query
The command uses GitHub’s GraphQL API to efficiently fetch review data:Agent Interruption
Before sending the message, the command:- Sends
Ctrl-Cto interrupt any running command - Waits 500ms for the interruption to take effect
- Sends
Ctrl-Uto clear any partial input - Waits 200ms
- Sends the review message
- Presses Enter to submit
Error Handling
Unknown project
Unknown project
Error:
Unknown project: xyzCause: The specified project ID does not exist in agent-orchestrator.yaml.Solution: Check your configuration file and use a valid project ID from ao status.PR access denied
PR access denied
If a PR cannot be accessed (private repo, insufficient permissions), it is silently skipped. No error is displayed.Solution: Ensure the
gh CLI is authenticated with appropriate permissions:Failed to send message
Failed to send message
Error:
Failed to send: ...Cause: Tmux session is not running or target is invalid.Solution: Verify the session exists with ao status and is in a running state.Use Cases
Automated review response workflow
Set up a cron job to periodically check for reviews:CI/CD integration
Trigger review checks after a PR review event:Manual review triage
Before end of day, check all pending reviews:--dry-run to send messages.
Prerequisites
- gh CLI - Must be authenticated with the repository
- GraphQL API access - Repository must be accessible via GitHub GraphQL API
- tmux - Sessions must be running in tmux for message delivery
Related Commands
ao send- Manually send messages to sessionsao status- View PR status for all sessions- Auto-reactions guide - Configure automatic review handling
