# Pause all agents

Stop every agent on your account at once during an incident, with a passkey or code to confirm, and resume them with one click when it's over.

Use this when something is wrong and you don't yet know which agent: a refund going to an unknown payee, a leaked key, a run you can't explain. One pause stops every agent on the account at once; **Resume all** undoes it. To stop one agent, suspend it instead ([`POST /v1/mandate/agents/{id}/suspend`](https://provenanceauth.com/docs/api/agents.md#post-v1-mandate-agents-id-suspend)), and to stop one team, [halt its run](https://provenanceauth.com/docs/mandate/guides/halt-a-run.md).

**Before you begin:** you're an owner or admin, signed in to the console. If you have two-factor sign-in, you confirm with your passkey or authenticator code. Pausing is free on every plan.

## 1. Pause

On **Overview**, under **Incident controls**, choose **Pause all agents**, or search for "pause all agents" (⌘K). The confirm names the workspace and what happens:

| While paused | What the agent sees |
| --- | --- |
| A new intent ([`POST /v1/mandate/intents`](https://provenanceauth.com/docs/api/intent-tokens.md#post-v1-mandate-intents)) | `403` [`agents_paused`](https://provenanceauth.com/docs/platform/errors.md#agents_paused); no token is issued |
| A decision on a token issued before the pause | `valid: false` with the reason [`agents_paused`](https://provenanceauth.com/docs/platform/reason-codes.md#agents_paused) |
| A call check ([`POST /v1/mandate/calls`](https://provenanceauth.com/docs/api/calls.md#post-v1-mandate-calls)) | Refused with the reason `agents_paused` |
| A [trace assessment](https://provenanceauth.com/docs/trace/guides/trace-rules.md) or [`POST /v1/trace/check`](https://provenanceauth.com/docs/api/trace-checks-and-locks.md#post-v1-trace-check) | `deny` or `block` with the reason `agents_paused` |
| A traced chat completion | No generation: `content: null`, `finish_reason: "agents_paused"` |
| A signed reading, a new trace job or an eval run | `403` `agents_paused` |

Pause all stops Trace too. To stop only Trace and keep payments running, [pause Trace](https://provenanceauth.com/docs/trace/guides/trace-rules.md#pause-trace) instead.

Tick **Also halt active runs** to halt every run too: their grants are revoked and their sessions locked, exactly as [Halt run](https://provenanceauth.com/docs/mandate/guides/halt-a-run.md#3-halt-it) does, and resuming doesn't restart them. Add a reason if you like; it shows in the banner and the audit log.

A red banner then runs across every console page for everyone on the account: since when, who paused and why. Owners and admins see **Resume all** in it.

The pause is [`POST /v1/mandate/agents/pause_all`](https://provenanceauth.com/docs/api/agents.md#post-v1-mandate-agents-pause-all) from a console session. API keys can't pause or resume, so a key someone else holds can't undo your pause.

## 2. Check from an agent

An agent can read the pause before it starts work:

**curl**

```bash
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5

curl -s $PROVENANCE_API/v1/mandate/settings/agent_pause \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const pause = await (
  await fetch(`${process.env.PROVENANCE_API}/v1/mandate/settings/agent_pause`, {
    headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
  })
).json();
```

**Python**

```python
pause = httpx.get(f"{api}/v1/mandate/settings/agent_pause", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
```

```json
{
  "object": "agent_pause",
  "paused": false,
  "paused_at": null,
  "runs_halted": 0
}
```

While paused, `paused` is `true` and the answer also says when, who paused and why. An agent that treats `agents_paused` like any other denial needs nothing more: every authorize and decision answers it.

## 3. Resume

Choose **Resume all** in the banner or on Overview ([`POST /v1/mandate/agents/resume_all`](https://provenanceauth.com/docs/api/agents.md#post-v1-mandate-agents-resume-all)), with the same confirm. Agents can be authorized again at once. Runs halted with the pause stay halted, and agents you suspended one by one stay suspended.

## 4. Follow it

| Where | What you get |
| --- | --- |
| Webhooks | `mandate.agent_pause.started` (with the reason and how many runs were halted) and `mandate.agent_pause.ended` |
| Audit log | `agents_paused` and `agents_resumed` in `GET /v1/org/security_events`, with who did it |

## Errors you might see

| Code | What to do |
| --- | --- |
| `agents_paused` | An owner or admin paused every agent. Wait for **Resume all**. |
| `recent_two_factor_required` | Confirm with your passkey or code; the console asks inline. |
| `insufficient_role` | Ask an owner or admin. Developers and analysts can't pause or resume. |
| `dashboard_session_required` | Pause and resume from a signed-in console session, not an API key. |

## See also

- [Halt a run](https://provenanceauth.com/docs/mandate/guides/halt-a-run.md)
- [Prevent agent takeover](https://provenanceauth.com/docs/mandate/guides/protect-agents-from-takeover.md)
- [If a key leaks](https://provenanceauth.com/docs/account/if-a-key-leaks.md)
