← All posts

Check GitHub Actions from the Terminal with Claude Code

Watch, debug and re-run GitHub Actions from the terminal with gh, let Claude Code read the failed logs and fix them, and see CI status in MOLTamp 3.3.

You can check GitHub Actions without leaving the terminal. The GitHub CLI does most of it: gh run list shows recent runs, gh run watch follows one live, gh run view --log-failed prints only the failing steps, and gh run rerun --failed retries just the broken jobs. Better still, Claude Code can run those commands itself, so "CI failed, fix it" becomes a one-line prompt. And if you want CI status visible next to your sessions without typing anything, MOLTamp 3.3.0 adds a GITHUB tab that shows Actions runs, jobs and steps with re-run and cancel a right-click away. Here is the whole loop.

Why this is worth fixing

The Claude Code loop goes: ask for a change, review, commit, push. Then the old loop takes over: open the browser, find the repo, click Actions, find your run, wait, refresh, wait, click into the failed job, scroll a 4,000-line log for the red bit. By the time you are back in the terminal you have lost the thread, and three other sessions have finished without you noticing. Keeping CI in the terminal keeps you in flow.

The gh commands you need

Install the GitHub CLI (brew install gh) and run gh auth login once. Then, from inside your repo:

Command What it does
gh run list Recent workflow runs for the repo, with status
gh run list --branch my-feature Runs for one branch
gh run watch Pick a run and follow it live until it finishes
gh run watch --exit-status Same, but exits non-zero if the run fails (great for scripts)
gh run watch --compact Shows only relevant and failed steps
gh run view <id> --log-failed Prints the log for failed steps only
gh run rerun <id> --failed Re-runs only the failed jobs, plus their dependencies
gh run cancel <id> Cancels a run

--log-failed is the hero here. It turns a giant log into the twenty lines you actually need.

A handy push-and-watch habit:

git push && gh run watch --exit-status --compact

Let Claude Code do the debugging

Claude Code can run shell commands, including gh. So instead of reading logs yourself, ask:

CI failed on this branch. Use gh to find the failed run, read the failing step logs, explain the cause, and fix it.

Claude will typically run gh run list, then gh run view --log-failed, read the error, find the code, and propose a fix. Approve the gh commands once, or add them to your allowed tools so read-only CI checks do not prompt every time. Our permission modes guide shows how.

Two tips that make this reliable:

  • Put the CI commands in CLAUDE.md. "Before saying a task is done, push and run gh run watch --exit-status" turns CI into part of Claude's definition of done. See CLAUDE.md best practices.
  • Reproduce locally first when you can. If the failing step is npm test, have Claude run it locally. It is faster than a CI round trip.

For running Claude inside CI itself (reviewing PRs, responding to @claude mentions), Anthropic publishes an official Claude Code GitHub Action. That is a different job from watching your own runs, but they pair well.

See CI without typing anything: MOLTamp 3.3

Typing gh run watch works. Seeing the status without asking is better, especially when you have several Claude Code sessions on different branches. That is what MOLTamp 3.3.0, released today, adds.

The GITHUB tab. A new panel tab shows GitHub Actions runs for your current branch, or every branch. Expand a run into its jobs, and a job into its steps. Right-click to re-run, re-run only failed jobs, or cancel. The tab's badge shows how many runs are in progress, or a red ✗ when your latest run failed, so you notice a broken build while you are still in the session that caused it.

A branch switcher in the GIT tab. Click the branch name to filter branches, check one out, or create a new one. Fetch from the header. A status dot next to the branch shows how CI is doing on the branch you are on.

Connect GitHub in the app. Sign in from inside MOLTamp with a one-time code, or keep using your existing gh login and it just works. Public repos work without signing in at all.

The GitHub tab exists because Vihang asked for GitHub in MOLTamp. Thank you, Vihang. Feature requests genuinely steer what we build; the roadmap is where they land.

Which approach fits you

  • Occasional CI checks: gh run watch after pushing is plenty.
  • CI fails often and the logs are long: let Claude Code read --log-failed and fix it.
  • Many sessions, many branches: keep CI visible. MOLTamp's GITHUB tab and branch status dot do that next to every session, along with tabs for up to 50 sessions and attention badges on the ones that need you.

MOLTamp is a skinnable terminal shell for Claude Code and other agent CLIs on Mac. It is free to use with every feature working, including the GitHub tab; a one-time $10 license removes a recurring popup. Download MOLTamp, or compare it with other terminals in the best terminal for Claude Code round-up.

Related: git worktrees for parallel Claude Code agents, Claude Code hooks, and pasting screenshots into Claude Code.

FAQ

How do I check GitHub Actions status from the command line? Install the GitHub CLI and run gh run list in your repo. Use gh run watch to follow a run live and gh run view <id> --log-failed to see only the failing steps.

Can Claude Code fix failing GitHub Actions? Yes. Claude Code can run gh commands to find the failed run, read the failing step logs, and propose a fix. Approve the commands or add them to your allowed tools.

How do I re-run only failed jobs in GitHub Actions from the terminal? Run gh run rerun <run-id> --failed. It re-runs the failed jobs and any jobs they depend on.

Does MOLTamp show GitHub Actions? Yes, from version 3.3.0. The GITHUB tab shows runs, jobs and steps for your branch or all branches, with re-run and cancel on right-click, and the GIT tab shows a CI status dot for your current branch.

Do I need to sign in to GitHub in MOLTamp? Not for public repos. For private repos, connect GitHub in the app with a one-time code, or MOLTamp uses your existing gh login.