· rangkumin.tech

GitHub CLI 2.105.0 can wait for pull request events instead of polling

GitHub CLI now supports GitHub Event Streams, so gh v2.105.0 users and coding agents can wait for a pull request to change with one command instead of polling in a loop. The gh event commands are in preview and need Event Streams access.

Why it matters

Running gh event listen with a pull request URL and the events you care about, such as a submitted review, creates the subscription, opens the stream and prints each event as a line of JSON. It exits after the first event by default, which lets it slot into scripts and agent loops, and the count, follow and timeout flags extend that behaviour.

Agents discover the commands on their own: gh pr create, gh pr view, gh run view, gh run watch and gh api now suggest gh event listen instead of polling. Subscriptions can also be managed directly with gh event subscription create, list, view and delete.

The feature requires gh v2.105.0 or later and access to Event Streams, which GitHub lists as a preview on GitHub.com with a waitlist. Waiting is limited to submitted reviews, pull request state and head changes, merge conflicts and completed check suites, so teams should keep polling for anything else.

Sources

Choose English or Indonesian. Up to two editions a day. Unsubscribe anytime.