Automates the detection and resolution of failing CI/CD workflows by iteratively inspecting the latest GitHub Actions run, analyzing failures, and applying code fixes until the workflow passes successfully.
Fix failing workflows
Run this loop in your preferred agent environment to automatically detect, diagnose, and repair failing GitHub Actions workflows.
Setup Environment
Ensure you're in a GitHub repository with active workflows and have the GitHub CLI (gh) installed and authenticated.
Execute Kickoff Prompt
Paste the kickoff prompt into the agent interface to initiate the workflow repair process.
Monitor Progress
Observe the agent's actions as it inspects failures, makes fixes, and checks for success. Intervene if needed based on guardrail constraints.
Verify Fix
Once the agent exits, manually verify that the workflow now passes and that changes made are acceptable.
Check Latest Workflow Status
Run 'gh run list' to identify the most recent workflow run and determine if it failed.
Inspect Workflow Logs
CI
Automatically analyzes cache metrics, identifies dependency-related bottlenecks, and optimizes caching strategy to improve cache hit rates in CI environments.
CI
This loop automatically identifies and removes flaky tests in your Node.js project. A flaky test is one that passes and fails intermittently without any code changes. The agent will run your test suite multiple times, detect inconsistent test results, and attempt to fix or remove the flaky tests to stabilize your CI pipeline.
CI
This loop optimizes CI pipeline efficiency by identifying and parallelizing independent jobs to reduce overall runtime. The agent iteratively analyzes the current pipeline structure, implements parallelization strategies, and validates improvements through metrics.
If failed, retrieve logs using 'gh run view <run-id> --log' to understand the root cause of failure.
Analyze Codebase
Examine relevant source files and workflow YAML to identify misconfigurations, missing dependencies, or incompatible code.
Apply Targeted Fixes
Modify workflow triggers, environment variables, or build scripts to address identified issues.
Commit and Push Changes
Stage changes with git, create a descriptive commit, and push to trigger a new workflow run.
Validate Success
Re-run the check command to confirm the latest workflow now passes.
Start the "Broken Workflow Repair" loop. Goal: Fix failing workflows Max iterations: 10 Between iterations run: gh run list Exit when: Latest workflow successful Analyze the latest GitHub Actions workflow run. If it failed, inspect the logs to identify the cause of failure, then modify the appropriate source or configuration files to fix the issue. Commit and push your changes, then re-check the workflow status. Repeat this process until the latest workflow run succeeds or you've reached 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 (Latest workflow successful). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.