# Fixing errors

> When the preview breaks, one click hands the actual error to a repair-focused AI pass.

Source: https://knowledge.estage.com/capabilities/fix-errors/
Part of the ESTAGE knowledge base (https://knowledge.estage.com). Full corpus: https://knowledge.estage.com/llms-full.txt

---
Sometimes a change breaks the preview — a red error screen instead of your page. Genesis has
a dedicated repair path for exactly this.

## Most errors never reach the AI

Common breakages have **known signatures**, and those are repaired **instantly and
deterministically — before any AI turn is spent**. You don't pay a turn, and you don't wait for a
model, for a class of error the builder already knows how to fix.

What's left over is what the AI is for.

## How to trigger it

- Click **Fix this error** on the error display, or
- Type *"fix this"* / paste the error text into chat.

## What it does differently

This isn't a normal edit pass. The repair path:

- **Reads the real error** — message, the file it points to, related imports — instead of
  guessing from your description.
- **Skips the planning phase** — error fixes are precise, line-level work, so it goes straight
  in.
- **Prefers the smallest possible change** that makes the error go away (a missing import, an
  unclosed tag, a missing package), rewriting more only when a file is genuinely corrupted.
- **Reloads the preview fresh** afterward, so you're not looking at a stale error.
- **Checks that the page actually renders.** "Fixed" means the preview builds and displays — not
  merely that the code compiled — and the repair pass stops the moment it does.

Typical fixes land in 10–20 seconds.

## When it isn't something the AI can fix

Some failures have nothing to do with your code — a cold server that hasn't woken up yet, for
example. You're **not offered an AI fix** for those anymore: the message says what's actually
happening, so you wait or retry instead of spending a turn on a repair that couldn't work.

## If the error persists

Click **Fix this error** again — the second pass diagnoses from the new state. If a change
just made things worse overall, [undo](/capabilities/undo/) is often the faster reset, then
re-ask for the change differently.

## Related

A failed **publish** (rather than a broken preview) has its own repair path — see
[Fixing publish failures](/capabilities/fix-publish/).
