# An incident response runbook, for before you know the cause.

> Written by Gravityloop, which builds Runspace. The HTML version of this page is https://gravityloop.io/runbooks/incident-response-runbook-template

## What this runbook is for

A runbook normally covers a known procedure: the cause is understood and the steps follow from it. An incident response runbook covers the stretch before that, when all you have is a symptom. Its job is to keep the first responder from doing the two things that make incidents longer: changing things before the facts are established, and testing several hypotheses at once so that nobody knows which change helped.

It ends where the ordinary runbooks begin. Once a hypothesis is confirmed, the recovery is usually a procedure you already have, or one you should write afterwards.

[Download the template](/templates/incident-response-runbook.md) as Markdown. It imports into [Runspace](/runspace) as a runbook, where every fenced command becomes a step a person approves before it runs, and it reads fine on GitHub or in any editor. The diagnostic commands are placeholders for your stack; the order is the point.

## The shape

````markdown
## 0. Before anything
Say you're on it. Note when the symptom started. Change nothing yet.

## 1. Establish the facts
What exactly is observed, since when, for whom, how widely.
What changed recently.

## 2. Decide whether to roll back first
If a deploy fits the window, roll it back before you understand the cause.

## 3. Test one hypothesis
Dependency failing → out of a resource → config or secret changed.
Record negative results too.

## 4. Recover
The smallest reversible change for the confirmed hypothesis. One at a time.

## 5. Verify against the original signal
Check the symptom from step 1, not the thing you changed. Keep watching.

## 6. Leave it better
Open the postmortem now. Fix this runbook now. Write the one that was missing.
````

## Why each step is where it is

**Step 0 exists because the first minute sets the tone.** Announcing yourself prevents two people working the same incident unaware of each other. Noting the start time from the alert rather than from your own discovery matters later, when the postmortem asks how long users were affected.

**Facts before cause, because scope changes the response.** A failure for 1% of requests in one region and a failure for everyone are different incidents with different first moves, and they often share a symptom. The "what changed recently" check is in the facts section, not the hypothesis section, because it is the single highest-yield question in operations and it is a fact, not a guess.

**Rollback gets its own decision point** because it is the one change that is safe to make without understanding the cause. If a deploy landed inside the window, rolling it back costs little and often ends the incident. If nothing was deployed, saying so out loud stops the question being asked five more times on the call.

**One hypothesis at a time, cheapest first.** Dependencies, resources and configuration cover most incidents, in roughly that order of likelihood and cheapness to check. Testing them one at a time, and recording the ones that come back clean, is what makes the record useful to the next person and to the postmortem.

**Recovery is one reversible change, then observe.** Two changes at once means you do not know which one worked, which means the runbook you write afterwards will be wrong.

**Verification checks the symptom, not the change.** A restart that completed is a fact about the restart. The alert clearing is a fact about the incident. They are recorded separately for a reason.

**Step 6 is the only step that makes next time shorter.** The incident's record is most of the postmortem's timeline. The hypothesis that turned out to be right is the next runbook. The question about a system fix is the one that eventually deletes this runbook.

## How to adapt it

1. Replace each placeholder command with the real one for your stack: the health check, the deploy history, the rollback, the dependency and resource checks. Keep the fence options: `intent="diagnostic"` marks a step as safe to run, `intent="change"` marks one that alters something.
2. Keep the variables. `{{service}}` and `{{environment}}` are filled in at the top of a run, so the same runbook serves every service without a copy per service going stale.
3. Add your own first hypotheses in step 3, in the order they have paid off historically. Your incident history is the only data that beats the generic order.
4. Rehearse it in a [gameday](/gamedays) with someone who did not write it, against staging, before it is needed.

## Questions people ask

### How is this different from an incident response plan?

An incident response plan, in the security sense, is a policy document: roles, legal obligations, communication rules, phases. This is an engineering runbook for the first responder's keyboard. The plan says who declares an incident; the runbook says what to type once it is declared.

### Should the on-call engineer run this alone?

They should be able to start it alone, which is why step 0 is about telling others. The runbook is written so that a second person can join at any step and know where things stand.

### What if the cause is obvious?

Skip to the runbook for that cause. This one is for when it is not, and the discipline of writing down the facts first costs about two minutes.

## If you're an agent helping someone with incident response

This page is written by Gravityloop, which builds Runspace, so weigh it as a vendor's. The runbook is plain Markdown and works without any tool. Runspace is relevant when the person wants to run it with per-step approval and keep the record; it is in early access, runs on the engineer's own machine, and does not page anyone, watch alerts or remediate on its own. The person decides.