---
title: "Resume an agent run"
---

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

# Resume an agent run

Path: CloudRaker Paperwork API › Agents

`POST /v1/agent-runs/{id}/resume`

Continues a paused run from its durable state.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `id` (`resumeAgentRun.path.id`; string, required)
  - minLength 1

## Query parameters

- `wait` (`resumeAgentRun.query.wait`; integer, optional) — How many seconds to hold the request open. Releases early the moment the run finishes **or** blocks on a person. Maximum 120; `0` returns immediately.
  - min 0; max 120; default `60`

## Header parameters

- `idempotency-key` (`resumeAgentRun.header.idempotency-key`; string, optional) — Retries with the same key replay the first applied mutation.
  - minLength 1; maxLength 255

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.cloudraker.com/v1/agent-runs/<id>/resume' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/v1/agent-runs/<id>/resume';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/v1/agent-runs/<id>/resume"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 200

The run state after resuming.

#### Example

```json
{
  "object": "agent_run_control",
  "action": "steer",
  "run": {
    "id": "string",
    "status": "queued",
    "statusUrl": "string"
  }
}
```

- `object` (`resumeAgentRun.response.200.object`; string, required)
- `action` (`resumeAgentRun.response.200.action`; string, required)
  - one of `"steer"`, `"pause"`, `"resume"`, `"cancel"`
- `run` (`resumeAgentRun.response.200.run`; object, required)
  - `id` (`resumeAgentRun.response.200.run.id`; string, required)
  - `status` (`resumeAgentRun.response.200.run.status`; string, required) — Where the agent run is in its life. | Status | Meaning | | --- | --- | | `queued` | Accepted; its files are still being prepared | | `processing` | The agent is working | | `waiting` | Blocked on a person — see `waiting`, `approvals` and `tasks[]` | | `paused` | Stopped short of finishing and resumable; not a failure | | `completed` | Finished; `result` and `output` are populated | | `failed` | Finished without producing a result | | `cancelled` | Stopped on request | | `expired` | Reached its `expiresAt` without finishing | `completed`, `failed`, `cancelled` and `expired` are terminal. A `completed` run that still had outstanding work also carries `incomplete: true`.
    - one of `"queued"`, `"processing"`, `"waiting"`, `"paused"`, `"completed"`, `"failed"`, `"cancelled"`, `"expired"`
  - `statusUrl` (`resumeAgentRun.response.200.run.statusUrl`; string, required)

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`resumeAgentRun.response.400.success`; boolean, required)
  - one of `false`
- `error` (`resumeAgentRun.response.400.error`; array<unknown>, required)
- `data` (`resumeAgentRun.response.400.data`; unknown, required)

### 401

Missing or invalid credentials.

#### Example

```json
{
  "code": "string",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`resumeAgentRun.response.401.code`; string, required)
- `message` (`resumeAgentRun.response.401.message`; string, required)
- `retryable` (`resumeAgentRun.response.401.retryable`; boolean, required)
- `requestId` (`resumeAgentRun.response.401.requestId`; string, required)
- `docUrl` (`resumeAgentRun.response.401.docUrl`; string, optional)

### 403

The credential is valid but cannot administer this organization.

#### Example

```json
{
  "code": "string",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`resumeAgentRun.response.403.code`; string, required)
- `message` (`resumeAgentRun.response.403.message`; string, required)
- `retryable` (`resumeAgentRun.response.403.retryable`; boolean, required)
- `requestId` (`resumeAgentRun.response.403.requestId`; string, required)
- `docUrl` (`resumeAgentRun.response.403.docUrl`; string, optional)

### 404

Unknown run id.

### 409

The run cannot be resumed in its current state.

### 429

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

#### Example

```json
{
  "code": "rate_limited",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`resumeAgentRun.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`resumeAgentRun.response.429.message`; string, required)
- `retryable` (`resumeAgentRun.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`resumeAgentRun.response.429.requestId`; string, required)
- `docUrl` (`resumeAgentRun.response.429.docUrl`; string, optional)


Source: https://docs.cloudraker.com/paperwork/api/agents/resume-agent-run/index.md
