GitHub CLI adds gh event listen to wait on pull requests
gh v2.105.0 introduces a command that streams pull request events instead of polling for them, though both it and Event Streams are still in preview.
On November 18, 2026, GitHub added Event Streams support to the GitHub CLI. From gh v2.105.0, one command can wait for a pull request to change rather than asking GitHub again and again in a loop. The command is gh event listen, and both it and the underlying Event Streams feature are in preview.
What gh event listen actually does
You pass the command a pull request URL and the events you care about, such as a submitted review. Per GitHub's changelog announcement, it sets up the subscription, opens the stream and prints each event as a line of JSON.
The default behavior is the interesting part for automation: it exits after the first event. That makes it something you can drop into a shell script or an agent loop without building your own stop conditions. Three flags adjust it. --count waits for a set number of events, --follow keeps the stream open, and --timeout stops the wait after a period. If you only need a couple of fields, --jq or --template trims the output.
Subscriptions can also be handled directly with gh event subscription create, list, view and delete.
Which events you can wait on
The source names submitted reviews, pull request state and head changes, merge conflicts, and completed check suites. Those map to the usual reasons a pipeline sits idle: a review nobody has given yet, a branch that moved under you, a conflict that appeared after someone else merged, or checks that have not reported.
Why this matters more than it looks
Before this, a script or an agent that needed to react to a pull request had to poll on a timer. That approach spends requests, adds a gap between the change and the reaction, and needs its own logic for when to give up.
GitHub is also steering agents toward the new command. When an agent runs gh pr create, gh pr view, gh run view, gh run watch or gh api, the CLI now suggests gh event listen instead of polling. This suggests that agents which learn tooling from the environment will pick up the streaming pattern without the person who wrote them changing anything.
Limits and open questions
Both pieces are preview software. The gh event commands may change, and they need access to Event Streams, which is in preview on GitHub.com and currently reached through a waitlist. Anyone outside that list cannot build on this yet.
The source does not say when either preview becomes generally available, whether the command syntax will hold steady, how stream rate limits compare with polling, or what the feature costs. It also does not say whether event types beyond the listed ones are supported. To try it, upgrade to gh v2.105.0 or later and check gh event --help.
What it means for building apps with AI
If you are wiring an agent into a repository, a blocking wait is a cleaner building block than a polling loop, because the agent reacts to a review or a failed check the moment it lands rather than on the next tick. The catch is availability: this is preview and waitlisted, so treat it as something to test rather than something to depend on.
For apps built and hosted on Draftship, paid plans include source code access and GitHub push, which is how you would get a project into a repository in the first place. The GitHub and Vercel documentation covers that flow. Draftship is not affiliated with GitHub and does not claim support for Event Streams.
Primary sources
- Wait for pull request events with GitHub CLI · GitHub Changelog, Nov 19, 2026
This article was drafted with AI assistance from the primary sources listed below and checked automatically against them. An editor hasn't reviewed it yet.