---
title: "Roll back to the previous version: the while.sh docs"
url: https://while.sh/en/docs/building-blocks/rollback/
updated: 2026-11-09
---

# Versions and rollback

Every version of your app is kept. Rolling back to the previous one takes a second during the 30 minutes after a deployment, and a few seconds after that.

> You, to your agent: Go back to the previous version.

## When to use it

Use it when a version disappoints: go back to the previous one, in one second during the 30 minutes after the deployment, in a few seconds afterwards.

## How it works

Each version is frozen, and the previous one stays ready: rollback switches traffic in one second during the 30 minutes after a deployment, in a few seconds afterwards. A version that fails its probe, or whose error rate rises, is withdrawn automatically.

## What to know

The previous version stays warm 30 minutes after the deployment, if the service does not sleep. For a sleeping service, it sleeps too: rollback switches traffic at once, and its first request wakes it. Progressive deployment, in steps, is not offered.

## Your agent's MCP tools

Your agent handles it with the `deploy_app` and `observe_app` tools.

## Guides

- [Roll back to the previous version in a second, from your AI agent](/en/guides/rollback/)
