Skip to main content
Nx Cloud Self-Healing CI is an AI-powered system that automatically detects, analyzes, and proposes fixes for CI failures. Instead of babysitting PRs, you get notified when a fix is ready to review or has already been applied.

Faster time to green

AI proposes fixes when tasks fail, reducing the time from a failing PR to a merge-ready one.

Stay in flow

Get fix notifications in your editor via Nx Console (VS Code, Cursor, WebStorm) or directly on the PR comment thread.

Deep workspace context

The AI agent understands your project graph, module boundaries, and build configurations — not just the error message.

Non-invasive

Works with your existing CI provider and pipeline configuration without requiring a full overhaul.

Enable self-healing CI

A VCS integration (GitHub, GitLab, Azure DevOps, or Bitbucket) must be configured in your Nx Cloud workspace before enabling Self-Healing CI.
1

Connect to Nx Cloud

2

Enable in Nx Cloud workspace settings

Go to your Nx Cloud workspace settings and enable Self-Healing CI.
3

Add nx fix-ci to your CI pipeline

Add the nx fix-ci step at the end of your main CI job, configured to always run even when previous steps fail.
If all tasks succeed, nx fix-ci becomes a no-op automatically. Using if: always() is safe and recommended.

Receive fix notifications

In your editor

With Nx Console installed (available from the VS Code Marketplace), you’ll receive a notification in VS Code, Cursor, or WebStorm when a fix is available. Click Apply to commit the fix to the PR branch.

On your pull request

Self-Healing CI posts a comment on the PR with:
  • A summary of the reasoning behind the proposed fix
  • A diff showing the exact changes
  • Buttons to apply or reject the fix

Apply and revert fixes

You can apply a proposed fix through:
  • The editor notification (Nx Console)
  • The PR/MR comment button
  • The Nx Cloud UI diff viewer
If a fix needs minor adjustments before applying, click Apply Locally to pull the changes to your local machine, tweak them, and push. To revert an applied fix, use the Revert changes button in the Nx Cloud diff viewer or manually revert the Git commit.

Configure self-healing behavior

Workspace settings

Configure Self-Healing CI through the Nx Cloud workspace settings:

Auto-apply verified changes

Self-Healing CI can automatically commit fixes to the PR branch when all of the following are true:
  1. The task matches the configured include patterns
  2. The AI agent is highly confident the fix is correct
  3. The fix has been verified to resolve the failure
A built-in preset handles deterministic Nx checks — nx format:check, nx sync:check, and nx conformance:check — automatically, running the writable counterpart (e.g. nx format) to fix the issue.

CLI overrides

Pass flags to nx-cloud start-ci-run to override workspace settings for a specific run:

Customize agent behavior with SELF_HEALING.md

Create a .nx/SELF_HEALING.md file in your repository to provide project-specific instructions to the Self-Healing CI agent:
If a CLAUDE.md file exists at the repository root, the agent reads it for additional context. SELF_HEALING.md takes precedence over CLAUDE.md for any conflicting instructions.