Waiting
A step that starts work waits for it to end, up to its Timeout: 60 seconds to 24 hours, and an hour when a new step does not say. A step whose work does not end in time fails with the time limit sentence.- While it waits, the run shows the step as “waiting for work to end”. It holds no engine, is not a wait for a person, so the approval time limit does not apply, and is not a stuck run.
- The step is recorded as waiting before the work is asked for, under the key the request is made with. If a node is lost in the middle of the request, the next engine asks again with the same key, so the work that was started is found and never started twice. Asking a model again after a lost node is another call, so it counts toward the run’s limit.
- The run carries on when the work ends, also after a deploy or a restart.
- Cancelling the run ends the step, not the work. An investigation, a fix request or a nested run already started keeps going.
- With Continue on failure the run goes on. Without it the run fails as for any step. A failed step that is retried starts its work again.
- If the runbook is edited so that another step stands where a waiting step was, or the runbook is deleted, the run fails with a sentence when its work ends.
- While SRE Agent is deploying an update, which takes a few minutes, the steps that wait for work (
start_investigation,request_fix,run_runbookandwait_for_card) refuse to start and fail with a sentence that says so. Run the runbook again afterwards.ask_modelandcreate_cardanswer at once and are not held.
What a later step can use
A step’s result is available as{{step_N.field}}: a card’s card_id and card_key, an investigation’s investigation_id, and a model’s answer and verdict. The step’s own output is a plain sentence.
What cannot choose a step’s target
What a step acts on is written into the runbook. Thealert_id, repo, service, files and card_id of a fix, the runbook_id of a nested run, the card and until of a wait, the team_id and priority of a card, and the max_tokens, answer_type and choices of a question are one of two things:
- Written into the step.
- One whole reference,
{{step_N.field}}, to an earlier step where a person typed the value in (aninputstep). For the card a step acts on, the reference may instead point to the key or id of a card an earliercreate_cardstep opened.
input step. Validate judges every step again against the runbook as it stands, a runbook cannot be approved while Validate reports an error, and the run checks the stored step once more before it asks for anything.
An input step whose answer a later step uses in one of those fields can be answered only by a person from their own session. The run page refuses the answer from a support session. Free text, such as a description, a question, a title, a reason or labels, may carry alert text, with credentials masked and the length held to the field’s limit.
A model’s answer is data
Anask_model answer can feed a card’s title or description or another prompt. It is never passed to a connector: a command, a check, a rollback or a condition that dispatches through a connector refuses {{step_N.answer}}, and Validate reports it as an error. A local condition cannot branch on it either.
To branch on what a model says, give the ask_model step an Answer type:
- Yes or no.
- One of the words, with up to eight single words.
verdict, the only part of the answer a condition may read, as {{step_N.verdict}}. The prompt keeps your instruction as you wrote it and shows what you interpolated, such as {{alert.title}} or another step’s output, to the model separately, labelled as data it must not obey. Text from delegated work is cleaned of credentials before it is kept.
The question of an ask_model step is the purpose Runbook model steps under Settings, AI providers, where you can pin a model for it. One run asks the model five times at most, with a reply of 2,000 tokens at most and a prompt of 8,000 characters at most. Every call counts against your organization’s monthly AI budget.
Who the step acts as
Every way a run starts or continues records who did it, and a step acts as that person, judged at the role they hold when the step runs, and lowered by the credential’s ceiling for an MCP token. The same rule applies as for the same action from a card. The person is, in order:- The person who approved the step.
- Otherwise, the person who pressed Resume from failure.
- Otherwise, the person who approved the run.
- Otherwise, for a run another runbook started, whoever acted for that run.
- Otherwise, the person who started it.
run_runbook with a personal token each record their person. A person who left or was demoted refuses the step with a sentence. A member who may not request fixes, where your organization lets only administrators, is refused a request_fix step. Where the nearest of those people is a support session acting as someone, the step hands nothing to SRE Agent and fails with a sentence until a person approves the run or the step, or presses Resume, from their own session.
A run with nobody behind it
A run with nobody on record, such as an alert or a schedule with approval mode Nobody, self-healing, or an API key over MCP, acts as SRE Agent. It is held to what the alert door holds its own run to.request_fixandrun_runbookrun only when your organization switched on unattended work for alerts, the matching self-healing entry would run unattended now for the alert’s service, a fix names a repository linked to that service, and a nested runbook is one the playbook would match to the alert. Self-healing’s own limits apply. With no alert, such as a schedule, neither runs.create_cardis refused to it, because a card for someone else needs a person who started or approved the run.- Asking a question, investigating and waiting for a card are open to it.
- A fix such a run requests is recorded as asked by a runbook, never as a person’s request, so it is not merged automatically for that reason.
request_fix or run_runbook step in a runbook that runs on a schedule with approval mode Nobody, and about a create_card step in any runbook that nobody starts or approves, because those steps are refused every time there. The platform’s pause and your organization’s self-healing pause stop every step. The runbook’s approval mode, high-risk steps, deploy freeze hold and rollback rules apply as they do to any step.
What cannot be undone
A step of these types takes no rollback. A rollback of a failed run undoes the connector steps that have one and leaves what these steps started. A dry run stops before any of them and says what it would do, exceptwait_for_card, which reads the card and carries on.
The runbook suggester never proposes these types.
Related
- Write and run runbooks: the builder, approvals and triggers.
- Runbook actions and step reference: templates, fan-out and verifying a step.
- Let SRE Agent handle alerts: the rules an unattended run keeps.
- Give a card to SRE Agent: the cards these steps open.