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

# Resume a Run

> Resume a `PAUSED` run with additional input. The reply in `task` is delivered to the agent as the answer to its pause request (the trailing `pause` tool call in the run's messages), and `variables` merge over the run's original variables. Resuming a run that is not paused returns a conflict.



## OpenAPI

````yaml post /v1/agents/runs/{runId}/resume
openapi: 3.0.0
info:
  title: Browserbase API
  description: Browserbase API for 3rd party developers
  version: v1
servers:
  - url: https://api.browserbase.com
    description: Public endpoint
    variables: {}
security:
  - BrowserbaseAuth: []
tags: []
paths:
  /v1/agents/runs/{runId}/resume:
    post:
      summary: Resume a Run
      description: >-
        Resume a `PAUSED` run with additional input. The reply in `task` is
        delivered to the agent as the answer to its pause request (the trailing
        `pause` tool call in the run's messages), and `variables` merge over the
        run's original variables. Resuming a run that is not paused returns a
        conflict.
      operationId: AgentRuns_resume
      parameters:
        - name: runId
          in: path
          description: The run ID.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                task:
                  description: >-
                    Additional input for the agent: the reply to its request for
                    input, which is the trailing `pause` tool call in the run's
                    messages (e.g. an answer or an approval). Delivered to the
                    agent as the result of that pause call.
                  type: string
                  minLength: 1
                variables:
                  description: >-
                    Optional named variables the agent can reference as
                    placeholders, i.e. `%variable%`. Each entry pairs a `value`
                    the placeholder resolves to with an optional `description`
                    that hints to the agent when it should be used. Values are
                    not persisted.
                  type: object
                  additionalProperties:
                    additionalProperties: false
                    type: object
                    properties:
                      value:
                        description: >-
                          The value the placeholder resolves to when the agent
                          uses it.
                        type: string
                      description:
                        description: >-
                          Optional hint to the agent describing what this
                          variable represents and when to use it.
                        type: string
                    required:
                      - value
              additionalProperties: false
      responses:
        '202':
          description: >-
            The resume has been accepted and the run is `RUNNING` again. Poll
            the run for its next state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentRun'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.browserbase.com/v1/agents/runs/run-id/resume \
              --header 'Content-Type: application/json' \
              --header "X-BB-API-Key: $BROWSERBASE_API_KEY" \
              --data '{
                "task": "The code is %code%",
                "variables": { "code": { "value": "123456" } }
              }'
components:
  schemas:
    AgentRun:
      description: >-
        One execution of an agent against a task. Created in `pending` and
        transitioned through `running` → `completed`/`failed` by the runner.
      type: object
      properties:
        runId:
          description: Unique identifier for the run.
          type: string
        agentId:
          description: >-
            The ID of the agent applied to this run, if any. Omitted for ad-hoc
            runs.
          type: string
        task:
          description: The original task description.
          type: string
        status:
          description: >-
            Current status of the run.

            - `PENDING` - agent will run soon

            - `RUNNING` - agent is currently running

            - `COMPLETED` - agent has finished running

            - `FAILED` - agent has failed the run

            - `STOPPED` - run was stopped by the user

            - `TIMED_OUT` - run exceeded maximum time

            - `PAUSED` - run is paused awaiting input from the caller; the
            agent's request is the trailing `pause` tool call in the run's
            messages
          type: string
          enum:
            - PENDING
            - RUNNING
            - COMPLETED
            - FAILED
            - STOPPED
            - TIMED_OUT
            - PAUSED
        sessionId:
          description: The Browserbase session ID powering this run.
          type: string
        sandboxId:
          description: External sandbox identifier assigned by the runner. Optional.
          type: string
        resultSchema:
          description: >-
            Per-run [JSON Schema](https://json-schema.org/specification)
            override for the result shape. When unset, the agent's default
            `resultSchema` applies.
          type: object
          additionalProperties: true
          properties: {}
        result:
          description: >-
            The agent's structured result for the run. Only present when the run
            has finished and output is available. The result conforms to the
            provided [JSON Schema](https://json-schema.org/specification) when
            one is set.
          type: object
          additionalProperties: true
          properties: {}
        cause:
          type: object
          properties:
            code:
              description: Structured failure code (e.g., RUNNER_HEARTBEAT_LOST).
              type: string
              maxLength: 64
            message:
              description: Human-readable failure detail.
              type: string
              maxLength: 500
          required:
            - code
        startedAt:
          type: string
          format: date-time
        endedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - runId
        - task
        - status
        - createdAt
        - updatedAt
  securitySchemes:
    BrowserbaseAuth:
      type: apiKey
      in: header
      name: X-BB-API-Key
      description: Your [Browserbase API Key](https://www.browserbase.com/settings).

````