---
title: "Start here: recover from an error"
description: "Identify the failing layer, preserve evidence, and choose the safest recovery."
---
An error is easier to recover from when you stop changing the project and identify the first failing layer. Preserve the exact message, decide whether the issue is temporary or project-specific, and make one controlled recovery attempt.

## The first five minutes

1.  Wait for any active Superapp change to finish.
2.  Do not send the same request repeatedly or begin several unrelated fixes.
3.  Copy the first meaningful error and note the action immediately before it.
4.  Check whether the last working version still builds or previews.
5.  Choose one matching guide below and test after one recovery change.

## Identify what is failing

<Accordion>
<AccordionItem title="The agent keeps attempting the same fix">
Stop the loop and continue with [Escape an agent error loop](/agent-error-loops). Restate the observed error and ask for diagnosis before another edit.
</AccordionItem>

<AccordionItem title="The latest version does not compile">
Open [Fix Swift and Xcode build errors](/build-errors). Start with the first compiler error rather than the final “build failed” summary.
</AccordionItem>

<AccordionItem title="The app builds, but the preview is stale or broken">
Use [Fix preview and runtime problems](/preview-runtime-errors) to separate an old preview, a launch crash, and incorrect app behavior.
</AccordionItem>

<AccordionItem title="A device build, capability, or Apple service fails">
Check [Fix signing and entitlement errors](/signing-entitlement-errors) before changing certificates or project identity.
</AccordionItem>

<AccordionItem title="The change is broader than the fix">
Return to a previous working version. See [History and recovery](/history-and-recovery) before adding more repair prompts.
</AccordionItem>
</Accordion>

:::note
A retry is appropriate for a temporary timeout or unavailable service. The same deterministic compiler, configuration, or permission error will not improve by retrying unchanged.
:::

## If you need help

Follow [Collect diagnostics and contact support](/support-diagnostics). Include the project name, affected screen, steps to reproduce, and the exact error. Never include passwords, private keys, recovery codes, or service-role secrets.
