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.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nrwl/nx/llms.txt
Use this file to discover all available pages before exploring further.
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.
Enable in Nx Cloud workspace settings
Go to your Nx Cloud workspace settings and enable Self-Healing CI.
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.- GitHub Actions
- GitLab CI
- Azure DevOps
- Bitbucket Pipelines
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
Configure self-healing behavior
Workspace settings
Configure Self-Healing CI through the Nx Cloud workspace settings:| Setting | Description |
|---|---|
| Enable Self-Healing CI | Enable or disable the feature for the workspace |
| GitHub PR comments | Show fix feedback in PR comments in addition to the Nx Cloud UI |
| Auto-retry flaky tasks | Automatically re-run tasks identified as flaky |
| Draft PR handling | Allow fixes to be generated for draft PRs |
| Protected branch prefixes | Branch prefixes for which fixes should never be generated (e.g. release/) |
Auto-apply verified changes
Self-Healing CI can automatically commit fixes to the PR branch when all of the following are true:- The task matches the configured include patterns
- The AI agent is highly confident the fix is correct
- The fix has been verified to resolve the failure
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 tonx-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:
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.