# Rollbacks

Sleuth supports the deployment of a previously deployed code revision, otherwise know as a rollback.

![](/files/-Md-2JU36tJC5VxYygU3)

It's not too uncommon for a team to deploy a code change and then realize, after some time, that the change isn't behaving how they intended. The most common strategy to deal with this is to roll-forward, making a quick fix for the new error. However, sometimes it's too difficult to make a quick fix and you decide to revert to the last known good code revision.

Sleuth automatically detects rollbacks by checking the SHA of the deploy currently being deployed against the SHAs of all existing deploys in the target environment. If a matching SHA is found on an existing deploy, Sleuth will do the following:

* Register the new deploy as a rollback and tag it with the tag <mark style="color:red;">`rollback`</mark>
* Identify all deploys registered between the rollback deploy and the initial deploy with the same SHA, and mark them as rolled back, changing their health to `Rolled back` and adding the tag <mark style="color:red;">`rolled_back`</mark>

![](/files/-Md-4TDtOZpoRKFzSKFG)

Rollbacks, by default, are counted as a failure when determining your [Change failure rate](/sleuth-dora/accelerate-metrics/change-failure-rate.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sleuth.io/sleuth-dora/modeling-your-deployments/code-deployments/rollbacks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
