Browse all guides
All guides
Docs

When a build does not work

What to do when a build fails, or the app looks broken in the preview.

TroubleshootingBuilding Updated 2026-10-28

Builds fail, and when one does the agent is told what went wrong and repairs the app on its own. A failed build is not lost work. If the app has been built before, the preview keeps showing the last working version while the repair runs. The steps below are ordered by how often they help.

The agent repairs a failed build on its own

When a build fails, the reason is handed to the agent and it starts fixing the app without being asked. The preview shows Fixing an issue… with the line "The agent hit a problem while building. It is fixing it automatically (attempt 2)." The number is how many attempts it has made. Let the attempt finish; the app is rebuilt when the agent is done. The repairs keep going by themselves until the app comes back or the agent needs something from you.

If the app has not finished a build in this session, there is no earlier version to show in its place. The preview says Building preview… and "The app is being built. It will appear here automatically once ready." If the repairs do not bring the app back and that message is still there, describe the problem in the chat rather than waiting for it.

What you see when a build fails

  • The last working version, with an amber bar. When there is an earlier version, the preview keeps it and a bar at the bottom says The latest changes aren't showing yet. and "Showing the last working version. You can ask the agent to fix it, or try rebuilding." Select the refresh control beside Publish — above the app or beside the chat input — or describe the problem in the chat. It shows a spinner and cannot be pressed while a build is running. It is also unavailable while the agent is working, and the preview rebuilds by itself when it finishes.
  • The app itself hit an error. A red bar appears at the bottom of the preview with the message the app produced. Select Ask agent to fix to hand the error to the agent, or Dismiss to close the bar without acting on it. Both are unavailable while the agent is working or a question is waiting for your answer.
  • The chat says the agent hit an error. The agent hit an error appears above the message explaining what happened. Send the request again, or describe it differently.
  • Build paused. If the chat shows Build paused. and a message about credit, the build stopped for credit, not because anything is broken. When you run out of credits covers that.

For the waiting states — Building preview… and Fixing an issue… — and how long a build can honestly take, see A build is stuck or slow.

Describe the problem again, with more detail

The agent works from your words, so a clearer description fixes most problems. Say three things:

  1. Where it happens — the screen or page.
  2. What you expected to happen.
  3. What you saw instead.

For example: "On the booking page the time list is empty, even though I added three services." Include the exact wording of any message shown on screen, since the agent can act on that wording. You can attach a file or an image to the message box when a picture would say it faster; if the model cannot read images, the box tells you and you can describe the screen in words instead.

Try a smaller change

If a large request fails or breaks part of the app, split it. Ask for one piece, check it in the preview, then ask for the next. For example, build the booking form first, then add the calendar view. A single clear change is easier for the agent to get right and easier for you to confirm.

When the agent says it cannot do something

An answer of "I cannot do that" is information, not a dead end. Ask the agent to explain the limit in plain terms and to say what it can do instead. Often the same outcome is reachable a different way, so restate what the app should do rather than how it should do it. If the request really is outside what the agent can build, it will say so; reshaping the request around the outcome you need is more likely to succeed than repeating it.

If none of this resolves it, Get help and report a problem. To return to a version that worked, see Go back to an earlier version.