---
id: 17312
lang: en
title: "GitHub CLI 2.105.0 Lets Agents Wait for Pull Request Reviews With One Command"
published_at: "2026-11-21 02:07:22"
source_name: "GitHub Changelog"
source_url: "https://github.blog/changelog/2026-11-18-wait-for-pull-request-events-with-github-cli"
canonical_url: "https://news.hamidun.com/en/news/17312"
categories: ["llm", "autonomous"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# GitHub CLI 2.105.0 Lets Agents Wait for Pull Request Reviews With One Command

> **Краткая суть (BLUF):** Until now, a script or AI agent waiting for a review on a pull request (a request to merge code) had to repeatedly ask GitHub whether anything had changed. In version 2.105.0 of the GitHub CLI (gh), one command does this. You give it a PR link and a list of events, and it creates a subscription and prints each event as a JSON line. By default, the command exits after the first event, so it is easy to drop into a script: wait, then move on. For now, this is a preview available through a waitlist.  • Waiting is possible for reviews, new commits, merge conflicts, and check suite results • You need gh 2.105.0 or later and access to Event Streams (preview) • An option lets you extract only the fields you need from the JSON

Anyone who has built automation around pull requests (requests to merge changes into the main branch) knows this kludge. You open a PR, run a script, and it hits the API in a loop to check whether a review has arrived, whether the checks have turned green, or whether a conflict has appeared. The problem has become more visible with AI agents: an agent pushes changes and then has to wait, and every extra polling cycle costs time, tokens, and API rate limits. In version 2.105.0 of the GitHub CLI (the `gh` command), there is now a way to wait for events with a single command. You provide the PR link and a list of events, and the result arrives as a line of JSON, a format that both scripts and models can easily read.

## What's new

Starting with `gh` 2.105.0, there are new commands for waiting on pull request events. You pass the request URL and the events you care about, such as a submitted review. The command creates the subscription itself, opens the stream, and prints each event on its own line of JSON.

The default behavior is designed for automation: the command exits after the first event. For a script, this is convenient, because it works like an ordinary blocking call: start it, wait, get the result, and continue. If you need to watch several events, a separate option enables that. To avoid parsing the entire JSON by hand, there is also an option that extracts only the fields you need.

The following events are supported:

- submitted reviews;
- changes in the pull request's state and head, meaning new commits on the request's branch;
- merge conflicts;
- completed check suites, such as a test run in CI.

For users who need direct control, there is the `gh event subscription create` command. It manages subscriptions directly, without the "wait and exit" wrapper.

## Why this matters for agents and scripts

Imagine an agent that fixes a bug and opens a PR. Next, it needs to wait for a review and make changes if reviewers raise issues. Previously, such an agent either had to run a loop with pauses or ask a human to say when everything was ready. Now it can call one command and get a line of JSON when the review is submitted. The same approach works for a scenario like "wait until the checks finish, then decide what to do next."

GitHub also notes that agents can discover the new commands on their own. The announcement gives no details, but the logic is clear: the CLI is self-documenting, and a model that can read `gh` help output can pick up the command without extra instructions in the prompt.

There is value for developers without agents, too. A release script, a bot that reminds people about stalled PRs, or a local workflow that reports when checks finish can be shorter and more reliable, without hand-written loops with `sleep`.

## Limitations

The main caveat: this is a preview, and the commands may change. If you wire them into a production pipeline, be ready to adjust the calls after an update.

The second limitation is access. The commands run on top of Event Streams, which is also in preview on GitHub.com. To use it, you need to join the waitlist. Updating `gh` is not enough: without access to Event Streams, subscriptions will not work.

The announcement does not say how the stream behaves when the connection drops, what limits apply to the number of subscriptions, or how long events are retained. These questions should be checked in the Event Streams documentation before you build a critical process on top of them.

## What to do

If you are building agents that work with repositories, sign up for the Event Streams waitlist and update the CLI to 2.105.0 or later. Then look through your scripts for loops that poll PR state and try replacing one of them with a subscription. GitHub asks for feedback in the community discussion, and details are in the Event Streams documentation.

---
- **Первоисточник:** [GitHub Changelog](https://github.blog/changelog/2026-11-18-wait-for-pull-request-events-with-github-cli)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/17312
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
