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

# Versions and rollback

> Every successful build is a version. Roll back to any of the last ten in seconds, with no rebuild, and know what a rollback does and does not restore.

A version is an image that built and passed its smoke test. Every successful build makes one, numbered 1, 2, 3 for each agent. One version is live at a time, and the endpoint answers from it.

## The Versions tab

The agent's **Versions** tab lists its versions, newest first: the number, the commit and its message, when it was built, and whether it is **Available** or **Removed**. The live version is marked.

Onecortex keeps the last **10** versions of each agent. When an eleventh is built, the oldest is removed and can no longer be rolled back to. It stays in the list, marked **Removed**.

## Roll back

<Steps>
  <Step title="Choose the version">
    On the **Versions** tab, click **Rollback** on the version you want live.
  </Step>

  <Step title="Confirm">
    The dialog shows the version's commit and when it was built. Click **Roll back**.
  </Step>
</Steps>

A rollback needs no build: the version's image already exists and already passed its smoke test. It typically takes about 30 seconds. The endpoint keeps answering throughout, from the old version until the rolled back one is live.

## What a rollback restores

* **The code**: the version's image, exactly as it was built.
* **Not the configuration.** Secrets and variables are applied at release, so a rolled back version runs with your configuration as it is today. If it has changed since that version was built, the dialog says so: `Configuration has changed since this version was built. It will run with your current secrets and variables.`
* **Not sessions.** Running instances restart on the rolled back version. See [Sessions](/build/sessions).

## Deploy a commit again

To build a commit again rather than roll back to its version, for example to pick up a configuration change in the image, click **Deploy** on the agent's page. It builds the head of the agent's branch.

## Limits

A rollback counts as a deployment: one agent runs one at a time, and an organization runs at most three builds and rollbacks at once. A rollback started past either limit is refused with `This agent is already deploying. Wait for it to finish and roll back again.` or its organization equivalent.
