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

# Automatic check repair

> Set a check intent and enable automatic repair for Browser and Multistep Checks.

For a check managed in Checkly, automatic repair can attempt to fix a Browser or Multistep Check when its script fails because of a check issue. A check intent states the goal, required outcomes, and guardrails that a repair must preserve. A failed check is not automatically repaired just because this setting is on; Rocky AI first needs a repairable failure and a valid intent.

Checks linked to a GitHub source file can also receive a repair proposal through a pull request, including other check types. Merge and deploy that change to update the running check.

<Accordion title="Prerequisites">
  * A saved Browser or Multistep Check
  * Permission to edit the check
  * Rocky AI enabled for automatic root cause analysis, with AI invocations available for analysis and repair
</Accordion>

## Enable automatic repair

1. Open the check editor and expand **Automatic Repair** in the check settings.
2. Review the **Check intent**. It needs a goal and at least one required outcome or guardrail. Include the outcomes the check must still prove, such as a successful sign-in or an order confirmation. Add guardrails for behavior a repair must not weaken, such as authentication.
3. Under **Automatic repair behavior**, select **On** to enable repair for this check. You can also select **Account default** to follow the account setting.
4. Save the check.

An AI-generated check already has an intent. Review it before enabling repair. Repair cannot start without a valid intent, even if the check or account setting is on.

## Add intent to an existing check

For an existing Browser or Multistep Check, select **Initialize from saved check** in the **Check intent** section. Checkly reads the saved script and dependencies and suggests an intent. Review the suggestion, edit its goal and outcomes if needed, then save the check. The suggestion is not saved and repair is not enabled just by selecting the button.

You can also write the intent yourself. Use this option when the script does not express all of the business requirements a repair must preserve. For example, a script might check that a page loads while the actual goal also requires a signed-in user to see the correct account.

## AI invocation usage

Each new root cause analysis uses one AI invocation. If Checkly also starts a repair, that repair uses one additional invocation from the same Resolve allowance. Each click on **Initialize from saved check** requests a new AI suggestion, but it does not currently draw from that allowance. AI Assistant conversations do not draw from it either. See [Rocky AI consumption and invocations](../ai/rocky-ai#consumption-and-invocations).
