> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sureops.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# HITL Gates

> When sureops pauses to ask for your approval, what those requests look like, and how to configure timeout behavior.

HITL (Human-in-the-Loop) gates are the specific moments when sureops stops and waits for a human decision before proceeding. Every approval gate creates a durable record: who approved what, when, and from which stage.

## When does sureops pause?

sureops pauses for approval at the following trigger points:

### Post-diagnosis: recommendation approval

After the Diagnosis Specialist produces root cause analysis and proposes remediation actions, the agent pauses before any fix is attempted — unless your org has opted into autonomous execution for that incident (off by default; see [Supervised vs Self-Driving](https://docs.sureops.ai/operating-modes/supervised-vs-self-driving.md)). This is the primary gate in the incident pipeline.

The approval request includes:

* The proposed root cause(s) with confidence scores
* Each recommended action with its risk classification
* The executor for each action (runtime execution vs. fix PR vs. human)
* Supporting evidence (metric data, log excerpts, trace analysis)

### P1 / P2 severity incidents

Critical and high-severity incidents have additional approval requirements, even in Self-Driving mode. The agent cannot auto-execute anything for a P1 or P2 incident regardless of your **Auto-execute low / medium-risk fixes** (`autonomous_execution`) settings.

### High-risk or destructive actions

**A high-risk action always pauses for human approval. No autonomy setting can lift that** — there is no configuration in which sureops executes a high-risk action unattended.

An action also counts as high-risk when sureops *can't* classify its risk: an absent or unrecognized risk label is treated as high and gated, rather than assumed safe.

High risk is one of five hard carve-outs that always require explicit human approval, regardless of mode or auto-approve settings, and none of which can be turned off:

1. **P1/P2 severity incidents** (above).
2. **Any recommendation that opens a fix PR** (below).
3. **Any high-risk action the agent would execute** — rollbacks that affect production traffic, scaling operations above a defined threshold, configuration changes to security-sensitive surfaces, or anything the diagnosis agent marks as potentially irreversible — plus anything whose risk couldn't be classified. (Risk gating applies to recommendations the agent would actually run. A recommendation whose outcome is "escalate to a human" or "monitor only" carries no agent action, so its own risk label doesn't gate the batch. Separately, a batch made up *entirely* of escalate hand-offs skips the approval queue and goes straight to a human.)
4. **Any diagnosis rebuilt from incomplete evidence** — a rare safeguard that only fires when a diagnosis run was interrupted mid-flight. Such a run never completed a full synthesis pass, so its recommendations always reach a human.
5. **Any diagnosis started from the stage card** while someone holds control (Re-run, Continue or Back into Diagnosis, or a budget reset) — its recommendations always wait for a human decision, even if your org auto-approves or auto-executes.

Within those bounds, the two auto-approve settings differ only in how much of the *low-and-medium* range they'll execute without you:

* **Auto-execute low / medium-risk fixes** (`autonomous_execution`), the default path when auto-approve is off — recommendations auto-execute only when **every** recommendation the agent would run is at or below your configured ceiling. The ceiling is evaluated batch-level, not per recommendation: if any one of them exceeds it, the whole batch waits for your approval rather than executing the rest.
* **Auto-approve agent actions** (`auto_approve_hitl`) — approves pending recommendations up to and including medium risk. It is the more permissive of the two, but it does not disable the risk gate: high-risk and unclassifiable actions still pause. These two settings are mutually exclusive — the risk-ceiling logic above only runs when auto-approve is off.

### Fix-PR recommendations always gate

Any recommendation that opens a fix PR against your GitOps repository always pauses for human review — even if your org has auto-approve or autonomous execution turned on. A fix PR mutates your source repository on merge, so you always see the draft diff before it can be approved. This is a hard-coded safety carve-out, not a configurable option.

***

## What an approval request looks like

### In-app

Pending approvals appear in two places:

1. **Command Center → Pending Approvals panel** — a list of all open approval requests across all active incidents.
2. **Incident detail page → Recommendations section** — inline approve/reject controls with full context.

Each approval card in the Pending Approvals panel shows:

* The incident and its severity
* The proposed action and its description
* Its risk label

On the incident page, each recommendation in the Recommendations section also shows the AI's confidence score.

Pending approvals also appear in the in-app notification bell.

### Slack notification

If you have Slack connected, sureops posts an approval request to the incident's war-room channel, if it has one — by default only P1/P2 incidents get a war room (see [Incident channels](https://docs.sureops.ai/problem-management/incident-channels.md)). The message includes:

* Incident name and link
* The proposed action summary
* Approve and Reject buttons (requires the sureops Slack app)

### Email

sureops can send an email notification to members with the **`approvals:grant`** capability (Commander, Admin, Owner) when an approval request is **created** — this is independent of Slack, not a fallback triggered by a Slack timeout. Email notifications for approval requests are **opt-in and disabled by default**: each user enables them individually in their notification preferences. If you're relying on email as a safety net for missed Slack approvals, confirm the relevant users have opted in — otherwise no email will be sent.

***

## Who can approve?

Approvals require the **`approvals:grant`** capability, which is granted to:

* Commander
* Admin
* Owner

Responders and Observers cannot approve HITL gates. See [Roles & Permissions](https://docs.sureops.ai/administration/roles-and-capabilities.md) for the full capability matrix.

Re-running a stage, marking handed-off fixes applied, or resetting a budget and re-running can discard an open approval, and only a role that can approve can do that. Releasing control by hand retires an open approval, and the stage re-runs; the new proposal still needs an approver. While an approval is open, only a role that can approve can take or release control, re-run or move a stage with the agent running, mark fixes applied, or move or unlink an incident's last alert. For a Responder those controls are disabled, with a tooltip saying an approval is open, until the approval is decided or times out. The auto-release timer never retires an approval: it waits until the approval is decided, and if the approval times out instead, the timer is cleared and the incident stays with whoever holds control.

***

## Timeout behavior

Approval gates have a configurable timeout. When a gate goes unanswered, sureops acts according to the `hitl_timeout_action` setting for your environment.

| Setting | Behavior on timeout |
| - | - |
| `escalate` (default) | The incident is handed to a human. The approval is not silently auto-approved. Sends a notification to the incident's Slack war-room channel if it has one, and via email to any user who has opted in (email is opt-in and disabled by default, same as the approval-creation email above). |
| `extend` | Resets the timer and sends another notification, in 30-minute increments. This can happen at most twice — on the third timeout, it falls back to `escalate`. |
| `auto_decide` | **Never auto-executes the proposed fix.** On timeout, `auto_decide` automatically **rejects** every pending recommendation in the batch — the fix is dropped, not run — and escalates the incident to human takeover, the same as `escalate`. There is no mode, risk, or severity gating on this branch: it is a flat, unconditional auto-reject-and-escalate, so a human always looks at the incident before anything the agent proposed is ever executed unattended. |

> [!WARNING]
>
> The `escalate` default means an unanswered approval never silently proceeds. The incident enters a waiting-for-human state, visible on the incident page and in the incident's Slack war-room channel if it has one, plus email for anyone who has opted into escalation emails (off by default, per-user). `auto_decide` carries the same guarantee — it never silently executes an action either, it just auto-rejects instead of leaving the recommendation pending.

The gate timeout duration is configured in **Settings → General**, in the "Approval Timeout" card ("Timeout (minutes)" field). The same Approval Timeout also limits how long an incident waits on hand-offs to a person; see [Hand-offs wait at Resolution](https://docs.sureops.ai/operating-modes/supervised-vs-self-driving.md#hand-offs-wait-at-resolution). The `hitl_timeout_action` behavior itself (`escalate` / `extend` / `auto_decide`) is not exposed in the UI today — it's API-only, so ask your onboarding contact to change it.

***

## HITL gates by mode

Both Self-Driving and Supervised modes have gates, but the set differs.

### Self-Driving mode

Gates fire at the specific triggers listed above: post-diagnosis recommendation approval, plus the five hard carve-outs — P1/P2 severity, fix-PR recommendations, high-risk or unclassifiable actions, diagnoses rebuilt from incomplete evidence, and diagnoses started from the stage card while someone holds control — none of which any auto-approve setting can bypass (see "High-risk or destructive actions" above).

Auto-approve settings can reduce the number of gates for lower-risk actions on P3/P4 incidents. See [Supervised vs Self-Driving](https://docs.sureops.ai/operating-modes/supervised-vs-self-driving.md) for configuration details.

### Supervised mode

In Supervised mode, detection and triage still run automatically with no gate — the difference from Self-Driving is the post-diagnosis gate: every batch of recommendations pauses for your explicit approval before resolution runs, with no auto-approve bypass available. The five hard carve-outs above apply here too, though in practice they change nothing: nothing auto-approves in Supervised mode to begin with.

Supervised mode does not, by itself, stop the incident after every stage — that's a separate axis. If you want the incident to pause after every stage so you can inspect it before it advances, take direct control of the incident (**Take Control**, available in either mode) rather than relying on the mode setting — see [Supervised vs Self-Driving](https://docs.sureops.ai/operating-modes/supervised-vs-self-driving.md#taking-control-mid-incident).

***

## What happens if no one approves

When a gate times out and the action is `escalate`:

1. The incident moves to a **waiting for human** state
2. The graph is suspended — no further agent actions run
3. The approval is marked expired: it leaves the Pending Approvals panel and can no longer be approved or rejected
4. Any team member with the Responder role or above can take over the incident and resume it
5. An unclaimed incident stays waiting until someone with the Responder role or above takes it over

To claim a system-escalated incident: open the incident and click **Take Over (Timed Out)**. This adopts the suspended state — you become the controlling user, the auto-release timer starts, and you drive the incident with the [stage card](https://docs.sureops.ai/using-sureops/incident-hub.md#the-stage-card-when-youre-in-control), or release control to let the AI resume.

If the underlying system recovers on its own while an approval is still pending, sureops doesn't leave a stale approval waiting for a decision that no longer matters — the recommendation is automatically marked **mooted** (a distinct terminal state, not silently rejected or dropped) and the incident routes to closure as recovered. If a pending approval disappears from your list without you acting on it, this is why.

***

## Mixed approval batches

When the Diagnosis Specialist proposes multiple recommendations, you can approve some and reject others. A few rules apply:

* An approval can only select recommendations that belong to it. A decision that names a recommendation outside that approval is refused, and nothing is recorded. Refresh the approval and decide again.
* You cannot approve both an **execute-fix** recommendation and a **reinvestigate** recommendation in the same batch. These have opposite meanings (act vs. dig deeper), so the system forces you to choose one direction.
* Approving a `reinvestigate` recommendation sends the agent back to the Diagnosis stage with focus on what you flagged. The maximum number of re-investigation rounds is configurable (default: 2) to prevent infinite loops.
* Each approved recommendation's intent determines the routing: `execute_fix` proceeds to resolution; `reinvestigate` returns to diagnosis; `monitor` moves to a watch-and-wait closure; `escalate` suspends to human takeover.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.