Developer automation · GitHub CLI · Original analysis

GitHub CLI can now wait for pull-request events instead of repeatedly polling

The preview can reduce wasteful polling in agent and automation loops, but it requires Event Streams access and still needs timeout, reconnection and idempotency controls.

GitHub wordmark above pull-request subscription, streamed JSON event and guarded automation panels in an illustrative developer workflow
GitHub wordmark with pull-request subscription, streamed event and guarded automation stages. Illustrative editorial layout; not a terminal screenshot or delivery guarantee. Credit: GitHub, Inc.; editorial layout by AI Speed Canada · Public-domain text logo; trademark rights retained. Wordmark placed in a distinct original 1280×720 editorial composition and converted to optimized WebP.

GitHub announced on November 18, 2026 that GitHub CLI version 2.105.0 adds preview commands for waiting on pull-request events through GitHub Event Streams. Instead of repeatedly querying a pull request in a loop, a person or agent can run gh event listen with a pull-request URL and selected event types, then receive matching events as newline-delimited JSON.

The command can wait for reviews, checks and state changes

GitHub lists submitted reviews, pull-request state and head changes, merge conflicts and completed check suites among the supported signals. By default the listener exits after its first event. Flags can wait for a set count, follow continuously or impose a timeout; jq and template output can extract selected fields for a script.

The CLI also exposes subscription creation, listing, viewing and deletion commands. Those operations make the subscription lifecycle visible, which is preferable to a hidden polling loop, but administrators still need to clean up unused subscriptions and understand which identity owns them.

Related sources: GitHub: Wait for pull request events with GitHub CLI ↗ · GitHub CLI manual: gh event ↗

Both the command family and Event Streams access are previews

The gh event commands require Event Streams, which GitHub currently offers through a waitlist on GitHub.com. The commands may change before general availability. Updating the CLI alone does not guarantee that an account can create a working stream.

Pin version 2.105.0 or later in controlled automation and verify access before replacing an existing polling path. Preview status is especially important for build or release gates: retain a fallback and avoid making a critical merge process depend on undocumented behaviour.

Related sources: GitHub: Wait for pull request events with GitHub CLI ↗

Event delivery does not make an action safe or exactly once

A stream tells an automation that something changed. The consumer still needs to fetch authoritative current state before a consequential action, because events can arrive after another update or be retried. Use stable identifiers, idempotency checks and permission validation before merging, deploying or posting a result.

Set explicit timeouts, handle disconnects and record the last confirmed state without storing unnecessary personal data. Canadian teams should review the repository and identity information placed in logs and keep access tokens scoped to the required organization and pull requests.

Related sources: GitHub: Wait for pull request events with GitHub CLI ↗ · GitHub CLI manual: gh event ↗

Compare polling cost with reliable completion

A useful pilot measures API calls avoided, time from event to action, reconnects, missed or duplicate work and manual recoveries. Lower API traffic is valuable only if workflows still finish predictably.

GitHub's release confirms the interface and preview availability; it does not establish reliability for every network, repository or long-running agent. Test representative review, push, conflict and check-suite sequences before wider use.

Sources and editorial method

We use the linked original statements and reports to distinguish documented facts from our analysis. Company announcements describe their authors’ plans and claims; they are not independent verification of future outcomes. This article is dated and will be revised if material evidence changes. Read our editorial standards and corrections process.

  1. GitHub: Wait for pull request events with GitHub CLI ↗ — Official November 18, 2026 release; version, commands, event types and preview access.
  2. GitHub CLI manual: gh event ↗ — Official command reference for listener and subscription operations.