>_ ghcli.com
ghcli / Automation & API / gh run watch

gh run watch

Follow an Actions run in real time

gh run watch streams the progress of a GitHub Actions run in your terminal, updating each job's status until the run finishes. Combine it with --exit-status to fail scripts on a broken build, so you can gate deploys on a green pipeline.

Quick answer
gh run watch

Syntax

gh run watch [<run-id>] [flags]

Examples

Pick a recent run and watch it

gh run watch

Watch a specific run by ID

gh run watch 8123456789

Fail the shell if the run fails

gh run watch 8123456789 --exit-status

Compact single-line output

gh run watch --compact

Custom refresh interval

gh run watch 8123456789 --interval 5

Options & flags

FlagWhat it does
--exit-statusExit with a non-zero code if the run fails.
-i, --intervalRefresh interval in seconds (default 3).
--compactShow only the most relevant, in-progress steps.

How to use gh run watch, step by step

  1. List recent runs with gh run list to grab an ID.
  2. Run gh run watch <run-id>, or plain gh run watch to choose interactively.
  3. gh refreshes each job's status until the run completes.
  4. Add --exit-status so CI scripts fail on a failed run.

Common errors and fixes

no runs found

No recent workflow runs exist. Trigger one with gh workflow run first, or push a commit that starts CI.

run 8123456789 has already completed

The run is finished, so there's nothing live to watch. Inspect it with gh run view 8123456789 --log.

Related commands

Frequently asked questions

How do I watch a GitHub Actions run from the terminal?

Run gh run watch to pick a recent run interactively, or gh run watch <run-id> for a specific one. gh streams live status until the run finishes.

How do I make a script fail when a workflow run fails?

Add --exit-status: gh run watch <run-id> --exit-status returns a non-zero exit code on failure, so you can chain it before a deploy step.

Can I change how often gh run watch refreshes?

Yes. Use --interval with a number of seconds, e.g. gh run watch --interval 5.