# Auto-fix and build repair

> When a build breaks, Vaulter tries to repair it before you ever see the error. How that works and what to do when it cannot.

Sometimes a change introduces an error that stops the app from building or running. When that happens, Vaulter tries to fix it for you before you ever have to deal with it.

## Three layers of self-repair

Vaulter watches for problems in three different ways, and each one repairs itself:

- **Build repair.** After the agent generates code, Vaulter validates it. If validation finds a real problem, a repair pass runs in the background and fixes it before the preview reveals. You never see the error, just a working app.
- **Runtime error repair.** If your running preview throws an error, an unhandled failure, or a crash in the browser, Vaulter catches it, gathers what it caught, and sends the agent a targeted fix request. Repair attempts are measured and spaced out, so it never thrashes or burns your tokens chasing the same error.
- **Blank-screen repair.** After every preview loads, Vaulter checks that the app actually rendered. If the screen came up blank or broken, that on its own triggers a repair, once per build.

This also applies when you open a project that was left in a broken state: Vaulter notices on load and tries to get it running again, so you can pick up where you left off.

## What you will see

- **Most of the time,** nothing at all. The build works, or Vaulter quietly fixes it, and the preview updates.
- **While a repair runs,** a soft loading cover sits over the preview. It drops on its own when a rebuild succeeds.
- **If the repair budget runs out,** the cover becomes an explicit "Preview failed to build" message with a **Retry** button.

## When auto-fix cannot resolve it

If a problem persists past the automatic attempts, describe in chat what you were trying to do and what went wrong. The agent can read the build logs and your app's health directly, so it usually finds the cause quickly with a little direction. If you are truly stuck, see [Troubleshooting and support](/docs/reference/troubleshooting).

> Auto-fix is there so a single bad change never leaves your app broken. You keep building, and Vaulter keeps the app runnable.
