> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blacksmith.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Autofix CI

> Keep pull requests green by automatically fixing CI failures and review feedback

\[code]smith automatically fixes CI failures and addresses review feedback from bots or humans.

<Frame>
  <video autoPlay loop muted playsInline className="codesmith-page-video" src="https://mintcdn.com/blacksmith/nbjvrnrvcCRYe1_Q/images/codesmith/autofix.mp4?fit=max&auto=format&n=nbjvrnrvcCRYe1_Q&q=85&s=68a346c743cd1689799eee52e1ecde7d" title="[code]smith autofix keeps pull requests green" data-path="images/codesmith/autofix.mp4" />
</Frame>

Autofix works across multiple rounds of review, addressing comments and CI failures as they happen so you never see a red PR.

PRs created by \[code]smith automatically enable Autofix by default. You can manually enable Autofix on a PR by clicking "Autofix with \[code]smith".

<div className="codesmith-page-image-wrap">
  <Frame>
    <img src="https://mintcdn.com/blacksmith/nbjvrnrvcCRYe1_Q/images/codesmith/autofix-with-codesmith-light.svg?fit=max&auto=format&n=nbjvrnrvcCRYe1_Q&q=85&s=da9887aefe5a9fe5674c8f0b21c665ab" alt="Autofix with Codesmith button on a GitHub pull request" className="codesmith-page-image" width="182" height="28" data-path="images/codesmith/autofix-with-codesmith-light.svg" />
  </Frame>
</div>

You can enable Autofix automatically on all future PRs by clicking on "Autofix settings" or from the [settings page](https://app.blacksmith.sh/settings?tab=codesmith).

<Frame>
  <video autoPlay loop muted playsInline className="codesmith-page-video" src="https://mintcdn.com/blacksmith/nbjvrnrvcCRYe1_Q/images/codesmith/autoautofix.mp4?fit=max&auto=format&n=nbjvrnrvcCRYe1_Q&q=85&s=fa5e5a7cbd92caf96b002b7c35421b8a" title="Enable Autofix automatically on future pull requests" data-path="images/codesmith/autoautofix.mp4" />
</Frame>

## PR footer settings

To manage Autofix, \[code]smith updates your PR footers with buttons to enable autofix for a specific change and to enable Autofix for all of your future changes.

You can disable this footer from the \[code]smith [settings page](https://app.blacksmith.sh/settings?tab=codesmith).

Autofix is billed at standard [\[code\]smith rates](/codesmith/pricing-and-faqs).

## How Autofix works

* \[code]smith automatically monitors PRs for CI failures and review feedback. When a test failure or review comment is posted, \[code]smith wakes up, processes it, and commits a fix.
* After a first comment, \[code]smith will batch incoming review comments and attempt to address them as a group.
* \[code]smith will not address human reviewers unless \[code]smith created the PR, or if it is explicitly @mentioned.
* Autofix is automatically enabled for any PR opened by \[code]smith. You can disable autofix for these PRs in the \[code]smith session web UI.

<Warning>
  Merge conflicts can trigger a cascade of lengthy \[code]smith sessions when PRs with autofix enabled depend on one another, as each updated PR triggers autofix on its dependent PR after it resolves its own merge conflicts, creating new conflicts.
</Warning>
