# Locking a Forecast Version

After you run a forecast version and review the results, lock the run to make it the version's official baseline. Overlays and exports only work against a locked baseline.

:::note[Beta: Agent mode]
Agent mode is in beta. Available actions depend on your workspace and permissions. If an action is unavailable, the assistant can explain how to do it in the app.
:::

## Lock a run

1. Run the version and wait for the status to show **Run Complete**. See [Running a Forecast Version](/forecasting/running-forecasts).
2. Click the lock button (padlock icon, tooltip **Set as locked**) in the upper-right toolbar.

The completed run becomes the version's official baseline.

## What locking does

* **Sets the baseline**: views that use the official baseline read that run's numbers. A chart or report with an explicit run selection can show a different run.
* **Enables overlays**: overlays can only run against a locked baseline.
* **Enables export**: locking does not export anything. To download CSV files, publish to your warehouse, or do both, use the separate [Export forecast action](/forecasting/exporting-forecasts) after locking the baseline.
* **Prevents re-running**: while the version is locked, the baseline stays stable for the work built on top of it.

## Unlock to re-run

To re-run a locked version, click the lock button again (tooltip **Clear lock**) to unlock it. Unlocking clears the official baseline. Overlays that ran against it can't run again until you lock a new baseline run.

## Run vs. lock

| Action | What it does | Can you undo it? |
|---|---|---|
| **Run** | Computes forecast numbers. | Repeatable while the version is unlocked. |
| **Lock** | Makes a completed run the official baseline. | Yes, by unlocking. |

## Lock or unlock with the assistant

In **Agent** mode, you can ask the assistant to lock a specific completed baseline run or to unlock a named version. It finds the exact run, checks it, and waits for you to click **Allow** or **Deny**.

The assistant tells you why and does nothing if:

* The run did not complete successfully.
* The run belongs to a different version.
* The run is already locked.
* You ask to unlock a version that has nothing locked.

Locking a different baseline run moves the version's overlays onto the new baseline and clears overlay locks that no longer match. The confirmation tells you when this will happen. Unlocking clears the baseline without cancelling running jobs or clearing overlay locks. Running the version again is a separate action.
