This loop automates the process of identifying, fixing, and resolving CI/CD workflow failures. It continuously monitors GitHub Actions workflow runs, inspects failure logs, applies targeted fixes, and re-runs workflows until all pass or maximum iterations are reached.
Fix workflow failures
Paste this loop into your agent (Cursor, Claude Code, Codex, etc.) to automatically resolve GitHub Actions workflow failures through iterative inspection and repair.
Check Workflow Runs
Run 'gh run list' to see the latest workflow execution statuses
Inspect Failed Workflows
For any failed runs, examine logs and error messages to identify root causes
Apply Fixes
Make necessary code or configuration changes to address the identified failures
Commit Changes
Commit fixes with descriptive messages and push to trigger new workflow runs
Monitor Progress
Repeat checking until all workflows pass or iteration limit is reached
Check Workflow Status
Execute 'gh run list' to retrieve current GitHub Actions run statuses and identify any failures
Automation
This loop automates the entire software release process by creating and validating a CI/CD pipeline that builds, tests, and deploys your application. The agent will iteratively refine the release pipeline until it passes all checks, ensuring a robust and reliable deployment process.
Automation
This loop identifies repetitive manual tasks in a project and automatically generates automation scripts to replace them. The agent iteratively analyzes workflows, creates optimized scripts, validates their effectiveness, and refines until all targeted manual steps are eliminated.
Automation
Automatically analyze and label unlabeled issues in a GitHub repository to improve organization and streamline development workflows.
Analyze Failure Details
For failed workflows, review logs, error messages, and context to determine the cause
Implement Fix
Modify relevant source code, scripts, or workflow configurations based on analysis
Commit and Push
Stage changes, create a commit with explanatory message, and push to origin branch
Wait and Recheck
Pause briefly for workflows to execute, then re-run 'gh run list' to verify fixes
Start the "Workflow Until Zero Failures" loop. Goal: Fix workflow failures Max iterations: 10 Between iterations run: gh run list Exit when: Workflow succeeds Start by running 'gh run list' to check the most recent GitHub Actions workflow runs. Identify any failed workflows, inspect their logs to determine the underlying issues, and apply targeted fixes. After each fix, commit your changes and push them to trigger new workflow runs. Continue this cycle until all workflows pass successfully or you reach 10 iterations. Self-pace this loop. After each iteration, run `gh run list` and evaluate the output, and only continue if the exit condition is not met (Workflow succeeds). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.