Fix CI/CD Pipeline Flow

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

Version history

  • Introduced as an experiment in GitLab 18.4 with flags named duo_workflow_in_ci and ai_duo_agent_fix_pipeline_button. duo_workflow_in_ci is enabled by default. ai_duo_agent_fix_pipeline_button is disabled by default. These flags can be enabled or disabled for the instance or project.
  • Enabled on GitLab.com and GitLab Self-Managed in GitLab 18.5.
  • Feature flag ai_duo_agent_fix_pipeline_button enabled by default in GitLab 18.5.
  • Generally available in GitLab 18.8. Feature flag ai_duo_agent_fix_pipeline_button removed. Feature flag duo_workflow_in_ci was removed in GitLab 18.9.
  • Available on the Free tier on GitLab.com with GitLab Credits in GitLab 18.10.

The Fix CI/CD Pipeline Flow helps you automatically diagnose and fix issues in your GitLab CI/CD pipeline. This flow:

  • Analyzes pipeline failure logs and error messages.
  • Identifies configuration issues and syntax errors.
  • Suggests specific fixes based on the type of failure.
  • Creates a merge request with changes that attempt to fix a failing pipeline.

The flow can automatically fix various pipeline issues, including:

  • Syntax and configuration errors.
  • Common job failures.
  • Dependency and workflow issues.

This flow is available in the GitLab UI only.

Prerequisites

To use this flow, you must:

Fix the pipeline in a merge request

To fix the CI/CD pipeline in a merge request:

  1. In the top bar, select Search or go to and find your project.

  2. In the left sidebar, select Code > Merge requests and open your merge request.

  3. To fix the pipeline, you can either:

    • Select the Overview tab and under the failing pipeline, select Fix pipeline with Duo.
    • Select the Pipelines tab and in the rightmost column, select Fix pipeline with Duo ({tanuki-ai}).
  4. To monitor progress, select AI > Sessions.

When the session is complete, a comment shows a link to a merge request that contains the fix, or a comment describes possible next steps.

Fix other CI/CD pipelines

To fix a CI/CD pipeline that is not associated with a merge request:

  1. Select Build > Pipelines.
  2. Select your failing pipeline.
  3. In the upper-right corner, select Fix pipeline with Duo.
  4. To monitor progress, select AI > Sessions.

What the flow analyzes

The Fix CI/CD Pipeline Flow examines:

  • Pipeline logs: Error messages, failed job outputs, and exit codes.
  • Merge request changes: Changes that could have caused the failure.
  • The current repository contents: For identifying syntax, linting, or import errors.
  • Script errors: Command failures, missing executables, or permission issues.

Flow log processing

The Fix CI/CD Pipeline Flow has a known issue related to log processing.

The AI gateway processes only the last 150 KiB of job logs. If your job produces extensive output, the flow might not capture relevant failure information that appears earlier in the log.

To work around this issue, try the following:

  • Reduce verbose output by removing debug logging and progress indicators.
  • Redirect non-critical output using shell redirection (> /dev/null).
  • Add a summary step at the end of your script that echoes key error messages.
  • Use after_script to output diagnostic information after the main script completes.
  • Split verbose jobs into smaller, focused jobs with more concise logs.