Let Claude Code Babysit Your CI
Manually Monitoring GitHub CI is a Pain
GitHub Actions workflows run on different hardware, timing, and environments than your local machine. The traditional fix? Tools like act that simulate CI locally. But it never quite replicates GitHub perfectly, and debugging remote failures remains a tedious, time-consuming process that requires you to intermittently check in and fix GitHub workflow-specific bugs.
Use Claude Code to Monitor Your GitHub CI Workflows
Claude Code + the gh CLI changes everything. Instead of simulating CI, you can have Claude Code autonomously monitor your actual workflows—checking status every few minutes, detecting failures, reading logs, making fixes, and re-running. It's a massive productivity booster.
The gh CLI Commands
With gh installed, Claude Code will automatically invoke these commands when prompted:
gh run view <run-id> # Check workflow status
gh run watch <run-id> # Watch in real-time
gh run view <run-id> --log # Get detailed logs
gh run rerun <run-id> --failed # Re-run failed jobs
The Prompt
Just tell Claude Code what you want in plain English:
"Check in on this PR's gh workflows every few minutes and debug; stop when they have completed successfully"
Claude Code detects failures, reads logs, identifies the issue, makes the fix, pushes the changes, and re-runs the workflow—all through natural conversation.
A Real Example
Here's a before and after from a recent PR on bleep-that-shit:
Before (Run #139 - Failed):
All jobs failed: Lint, Smoke Tests, and all 3 E2E test shards. Status: Failure in 1m 6s.
After (Run #140 - Success):
All jobs green, 5 artifacts generated. Status: Success in 2m 24s.
Conclusion
Stop babysitting CI. Let Claude Code do it.