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

# Checkpoints & publishing

> Track versions in chat, preview or publish from a checkpoint, and restore earlier work

When a **Build mode** prompt finishes changing your app, Prod AI automatically creates a **checkpoint**: a version of your app you can preview, publish, or restore.

Prod AI does not create a checkpoint for a prompt that only answers a question, a prompt in Plan mode, or a prompt that stops before it finishes, for example while waiting for your approval or after you close the tab.

![Checkpoint in chat with Preview and Publish](https://mintcdn.com/prod-ai/b0osS-Pwnu-fCGg7/images/building-with-clark/checkpoints/01-checkpoint-in-chat.png?fit=max\&auto=format\&n=b0osS-Pwnu-fCGg7\&q=85\&s=940c96d34193200e1082df81bde90e88)

## Version history

Version history lives in the editor chat panel. To open it:

1. Open the chat panel in the editor
2. In the panel header, click the **Version history** icon (next to **Chat**)

The list shows every checkpoint for the app, where each checkpoint may display details like a **Live** badge for the current production version, build status, and a menu for **Preview**, **Publish**, and related actions.

## Preview from a checkpoint

From a checkpoint in chat or version history, click **Preview** to build a preview of that version. When the build is ready, open the preview from the notification (**Your checkpoint preview is ready. Open preview**) or from the Publish detail view when available.

## Publish from a checkpoint

From a checkpoint in chat or version history, click **Publish** to promote that version to production. Prod AI builds, runs pre-publish checks, and deploys in one flow.

Builders need [permission to deploy the application](https://docs.prod.ai/admin/org-administration/resource-roles.md#applications). Without it, the **Publish** button stays disabled with a message that you do not have permission to publish to production.

### Publish detail view

To open the publish details tab, click **View publish details** from a previewed / published checkpoint card, or click any previewed / published version in history. The **Publish** tab shows:

* Progress through the pipeline (build, pre-publish policies, database steps when applicable, publish status)
* Errors and retries when a step fails
* Pre-publish security and policy findings (one-click **Fix** with a coding agent, acknowledge advisory findings, or **Publish anyway** when allowed)
* Database actions such as provisioning, schema migrations, and acknowledgement of destructive migrations before they run in production

### Git-connected apps

For apps connected to Git, publish using the **Deploy** tab (default branch, e.g. `main`). Publishing is disabled on the **History** tab, which displays checkpoints for the working branch.

For more on Git workflows, see [Connect to Git](https://docs.prod.ai/development-lifecycle/version-control/connect-to-git.md).

## Restore a checkpoint

Restoring resets the app edit state and chat history to that checkpoint. Messages and checkpoints after the restore point are permanently archived. To restore a checkpoint:

1. Open the checkpoint in chat or find it in **Version history**
2. Choose **Restore**
3. Confirm in **Restore to checkpoint**

If the app uses a managed database, restoring the app does not change schema or data. If later migrations were breaking, the app may fail until the schema is made compatible again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.