# Roll back a deployment

> What rollback means in AI CodeOps: you roll back in your own deploy pipeline, then mark the deployment rolled back so history and failure rate stay accurate.

Source: https://aicodeops.dev/docs/rollback · Last updated: 2026-10-18

AI CodeOps doesn't redeploy older versions, call your pipeline to roll back, or roll back on its own. Rollback happens in your deploy pipeline. AI CodeOps keeps the record straight: you mark the deployment as rolled back, and the history and delivery metrics reflect it.

## Mark a deployment as rolled back

1. Roll back in your own deploy pipeline.
2. In AI CodeOps, open **Release → Deployments**.
3. Find the deployment in the history. You can filter by environment and status.
4. Choose **Mark rolled back** on its row.
5. The dialog names the deployment, for example "Mark production @ 3f9c2a1b as rolled back?". Choose **Mark as rolled back**.

The dialog says what this does: "This records the deploy as rolled back in the history. It does not redeploy anything: roll back in your deploy pipeline, then mark it here."

## What changes

- The deployment's status becomes **rolled back**, with the note "Rolled back via dashboard". If it had no end time, it gets one.
- It counts as a failure in the **change failure rate** on the dashboard: failed plus rolled-back deploys, out of all finished ones. It no longer counts toward deployment frequency.
- The **Rolled Back** count on the Deployments page goes up.

Nothing is sent to your deploy webhook, and no incident is opened.

## Which deployments you can mark

- Only **succeeded** or **failed** deployments show **Mark rolled back**. A queued or in-progress deployment doesn't.
- Rolled back is final. It can't be changed back.
- You need a role that can manage deployments: owners, admins, developers, members and DevOps admins have it; viewers don't. See [Members and roles](https://aicodeops.dev/docs/members).

## Record what you restored

Marking a deployment rolled back doesn't record what's running now. To keep the history complete, record the version you restored: choose **Record deployment**, pick the project and environment, set the status, and enter the version or commit SHA. See [Gated deploys](https://aicodeops.dev/docs/gated-deploys).

## Fix forward with a session

To fix the problem that caused the rollback, start a [session](https://aicodeops.dev/docs/sessions) on the project. If an incident is open for it, choose **Fix with AI** on the incident. The fix goes through the same tests, review and approval as any other change.

## Next steps

- [Gated deploys](https://aicodeops.dev/docs/gated-deploys)
- [Quality gates](https://aicodeops.dev/docs/quality-gates)
- [Gated deploys and rollback tracking](https://aicodeops.dev/product/deploy)

## Frequently asked questions

### Does AI CodeOps roll back a deploy automatically?

No. There is no automatic rollback. You roll back in your deploy pipeline, then mark the deployment rolled back in AI CodeOps.

### Does Mark rolled back redeploy the previous version?

No. It only changes the deployment's status in the history. Nothing is sent to your pipeline.

### Can I undo a rolled-back mark?

No. Rolled back is a final status. To record the version you restored, record a new deployment.
