# Continue Team Run (/reference-api/schema/teams/continue-team-run)

## Team storage and identity [#team-storage-and-identity]

Use the database-backed [example Team server](/reference-api/schema/teams/create-team-run#example-team-server). Keep the Team run's returned `run_id` and `session_id`; a nested member run is not interchangeable with the Team run. Stored run, checkpoint and session operations require the configured database.

JWT user isolation is opt-in; non-admin service-account PAT callers always self-scope. Scoped callers need their own matching Team session and run, while configured resource authorization also applies. Run and checkpoint lookups return **404** for inaccessible or mismatched records. For factories, retain any `factory_input` needed by endpoints that reconstruct the Team.

## Resolve a paused Team [#resolve-a-paused-team]

Start with an actual `PAUSED` run, such as the [Team approval example](/examples/agent-os/human-in-the-loop/team-approval). That example configures both leader and member approval tools and shows how to resolve any persistent approval record before continuing.

Save the returned **`requirements` array** to `requirements.json`. Preserve its IDs, tool-call IDs and member context. After a human approves a confirmation requirement, set its `confirmation` to `true`; provide the appropriate user-input or external-execution result for other requirement types. Resend the issued array with only those decisions changed.

```bash
TEAM_ID="leader-approval-team"
RUN_ID="returned-paused-run-id"
SESSION_ID="returned-session-id"
curl --fail-with-body "http://127.0.0.1:7777/teams/$TEAM_ID/runs/$RUN_ID/continue" \
  -H "Authorization: Bearer $OS_SECURITY_KEY" \
  -F "session_id=$SESSION_ID" -F 'stream=false' \
  -F 'requirements=<requirements.json'
```

The linked approval server can use the same `OS_SECURITY_KEY` configured in the example Team server. Local Teams require `session_id`, including unscoped callers. Team continuation binds decisions to stored requirements by identity; the field is `requirements`, not the Agent API's `tools` field. Conflicting or duplicate identities cannot select a different member's operation.

Inspect the returned status: continuation can pause again. Continuing a completed Team run with follow-up input creates a new run ID; retain the returned ID. Explicit `fork` and `regenerate` are separate controls for branching or replacing a run.

## Background continuation [#background-continuation]

An eligible paused durable ticket can resume through the queue and return **202** for non-streaming acceptance. Without that path, `background=true, stream=false` currently executes inline and waits for output. Background streaming uses a detached process task unless queued; it can survive a client disconnect but not a process restart. Streaming events retain their Team-prefixed names.

## `POST /teams/{team_id}/runs/{run_id}/continue`

**Summary:** Continue Team Run

**Description:** Continue a paused or incomplete team run with updated requirements.

**Use Cases:**
- Resume execution after tool approval/rejection
- Provide manual tool execution results
- Resume after admin approval (requirements can be empty; resolution fetched from DB)

**Requirements Parameter:**
JSON string containing array of requirement objects with tool execution results.
Can be empty when an admin-required approval has been resolved.

### Authentication

- Option 1: `HTTPBearer` — HTTP bearer

### Parameters
- `run_id` (path; string; required)
- `team_id` (path; string; required)

### Request body

Required: no.

#### `application/x-www-form-urlencoded`

Schema `Body_continue_team_run` (object).

**Top-level fields**
- `additional_instructions` (string | null; optional)
- `background` (boolean; optional; default `false`)
- `continue_from` (string; optional; default `"end"`) — Continuation boundary. Use 'end', 'last_user', or a numeric message index.
- `fork` (boolean; optional; default `false`)
- `input` (string | null; optional)
- `regenerate` (boolean; optional; default `false`)
- `replace_original` (boolean | null; optional)
- `requirements` (string; optional; default `""`)
- `session_id` (string | null; optional)
- `stream` (boolean; optional; default `true`)
- `user_id` (string | null; optional)

### Responses

#### `200`

Team run continued successfully

**`application/json`**

Type `unspecified`.

**`text/event-stream`**

**Example**

```text
event: RunContent
data: {"created_at": 1757348314, "run_id": "123..."}


```

#### Other responses

- `400` — Invalid JSON in requirements field or invalid requirement structure `application/json`: Schema `BadRequestResponse` (object).
- `401` — Unauthorized `application/json`: Schema `UnauthenticatedResponse` (object).
- `403` — Run has a pending admin approval and cannot be continued by the user yet.
- `404` — Team not found `application/json`: Schema `NotFoundResponse` (object).
- `409` — Continuation conflict: a durable queue ticket owns this run's continuation (continue it with background=true), or a continuation is already queued or executing. Runs in any state can be continued - a COMPLETED run forks into a follow-up; RUNNING/ERROR runs resume.
- `422` — Validation Error `application/json`: Schema `ValidationErrorResponse` (object).
- `500` — Internal Server Error `application/json`: Schema `InternalServerErrorResponse` (object).