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

# List input a session has accepted but not read

> Returns the messages waiting for a busy session, in acceptance order. A message sent while the agent is mid-turn is durable immediately but is not part of the transcript until the next turn boundary reads it, so it appears here and not in the events listing. Each entry's input_id becomes the event id on promotion, which is how a client follows a queued message into history. Interrupt the session to have the queue read now.



## OpenAPI

````yaml /recursion/openapi.yaml get /managed-agents/v1/sessions/{sessionId}/pending-inputs
openapi: 3.1.0
info:
  title: Managed Agents API
  version: 0.14.0
  description: >-
    The Recursion Managed Agents REST API. Authenticate with a Recursion API key
    as a bearer token. An organization-scoped key acts in its own organization
    and needs nothing else; a tenant-scoped key must also send
    `x-organization-id` with an organization id or `default`. Field names follow
    each operation's published schema.
servers:
  - url: https://api.recursion.labelbox.com
security:
  - bearerAuth: []
paths:
  /managed-agents/v1/sessions/{sessionId}/pending-inputs:
    get:
      tags:
        - Sessions
      summary: List input a session has accepted but not read
      description: >-
        Returns the messages waiting for a busy session, in acceptance order. A
        message sent while the agent is mid-turn is durable immediately but is
        not part of the transcript until the next turn boundary reads it, so it
        appears here and not in the events listing. Each entry's input_id
        becomes the event id on promotion, which is how a client follows a
        queued message into history. Interrupt the session to have the queue
        read now.
      operationId: managedAgentsListSessionPendingInputs
      parameters:
        - description: >-
            Session id (UUID) as returned by managedAgentsStartSession or
            managedAgentsListSessions.
          in: path
          name: sessionId
          required: true
          schema:
            description: >-
              Session id (UUID) as returned by managedAgentsStartSession or
              managedAgentsListSessions.
            format: uuid
            type: string
        - $ref: '#/components/parameters/RecursionTenantId'
        - $ref: '#/components/parameters/RecursionOrganizationId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingInputsResponse'
          description: >-
            Response body of GET
            /managed-agents/v1/sessions/{sessionId}/pending-inputs: what the
            session has durably accepted but not yet read. These inputs are
            deliberately absent from the transcript until a turn boundary
            promotes them, so a client can show them as waiting rather than as
            history the agent has already acted on.
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidRequest'
                x-recursion-error-codes:
                  - invalid_request
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorUnauthorized'
                x-recursion-error-codes:
                  - unauthorized
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorForbidden'
                x-recursion-error-codes:
                  - forbidden
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorNotFound'
                x-recursion-error-codes:
                  - not_found
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '413':
          description: Payload Too Large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorPayloadTooLarge'
                x-recursion-error-codes:
                  - payload_too_large
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '429':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
          description: Too Many Requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorRateLimitExceeded'
                x-recursion-error-codes:
                  - rate_limit_exceeded
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorInternalError'
                x-recursion-error-codes:
                  - internal_error
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '502':
          description: A dependent service returned an invalid response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorDependencyFailure'
                x-recursion-error-codes:
                  - bad_gateway
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '503':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
          description: Service Unavailable.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                discriminator:
                  propertyName: code
                  mapping:
                    managed_agents_unavailable: >-
                      #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                    service_unavailable: >-
                      #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                x-recursion-error-codes:
                  - managed_agents_unavailable
                  - service_unavailable
        '504':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
          description: A dependent service timed out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorDependencyTimeout'
                x-recursion-error-codes:
                  - gateway_timeout
components:
  parameters:
    RecursionTenantId:
      name: x-tenant-id
      in: header
      required: false
      description: >-
        Optional tenant consistency check. When present, it must name the tenant
        bound to the API key, including when x-organization-id is `default`.
      schema:
        type: string
        minLength: 1
    RecursionOrganizationId:
      name: x-organization-id
      in: header
      required: false
      description: >-
        Organization in which to act. Required for a tenant-scoped API key.
        Optional for an organization-scoped key, where it must name that same
        organization. The value may be an organization id or `default`.
      schema:
        type: string
        minLength: 1
  schemas:
    PendingInputsResponse:
      description: >-
        Response body of GET
        /managed-agents/v1/sessions/{sessionId}/pending-inputs: what the session
        has durably accepted but not yet read. These inputs are deliberately
        absent from the transcript until a turn boundary promotes them, so a
        client can show them as waiting rather than as history the agent has
        already acted on.
      properties:
        pending_inputs:
          type: array
          items:
            $ref: '#/components/schemas/PendingSessionInput'
          description: Inputs waiting for the agent, ordered by acceptance time.
      required:
        - pending_inputs
      type: object
      additionalProperties: false
    ManagedAgentsApiErrorInvalidRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - invalid_request
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorUnauthorized:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - unauthorized
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorForbidden:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - forbidden
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorNotFound:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - not_found
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorPayloadTooLarge:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - payload_too_large
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorRateLimitExceeded:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - rate_limit_exceeded
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorInternalError:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - internal_error
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorDependencyFailure:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - bad_gateway
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorManagedAgentsUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - managed_agents_unavailable
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorServiceUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - service_unavailable
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorDependencyTimeout:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - gateway_timeout
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    PendingSessionInput:
      description: >-
        One user input that has been durably accepted but not yet read by the
        agent. Queued inputs are not part of the session transcript until the
        next turn boundary promotes them, which interrupting brings forward.
      properties:
        created_at:
          description: RFC 3339 timestamp of when the input was accepted. Server-assigned.
          format: date-time
          type: string
        event:
          $ref: '#/components/schemas/PendingSessionInputEvent'
          description: >-
            The message event this input becomes when promoted into the
            transcript.
        input_id:
          description: >-
            Identifier for this queued input (UUID). Becomes the event id once
            the input is promoted into the transcript.
          type: string
        kind:
          type: string
          const: message
          description: Always message. Interrupt controls are never stored in this queue.
      required:
        - input_id
        - kind
        - event
        - created_at
      type: object
      additionalProperties: false
    ManagedAgentsApiErrorDetails:
      type: object
      properties:
        field:
          description: >-
            Request field or header responsible for the error, when one can be
            identified.
          type: string
        issues:
          description: >-
            Boundary-validation failures as path-prefixed human-readable
            messages.
          type: array
          items:
            type: string
        requestId:
          description: Request correlation identifier for support and log lookup.
          type: string
        retryable:
          description: >-
            Server advice about failure transience. `true` means transient,
            `false` means non-transient, and absence gives no advice. Automatic
            replay is allowed only when this field is not `false` and the
            operation-specific retry and idempotency contract permits replay.
          type: boolean
      additionalProperties:
        $ref: '#/components/schemas/PlatformSafeJsonValue'
      description: >-
        Optional structured error details. Reserved transport fields are typed;
        code-specific fields remain forward compatible.
    PendingSessionInputEvent:
      description: >-
        The message event for one user input that has been accepted into a
        running session queue.
      properties:
        actor:
          type: string
          description: >-
            Attribution supplied for a user message or assigned to a system
            message.
        content:
          type: object
          additionalProperties: false
          properties:
            blocks:
              type:
                - array
                - 'null'
              items:
                $ref: '#/components/schemas/PendingSessionInputContentBlock'
              description: Ordered provider-shaped content blocks of the queued message.
            metadata:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/PlatformSafeJsonValue'
              description: >-
                Optional server-owned trusted-ingress or oversized-content
                truncation metadata.
          required:
            - blocks
          description: Message content accepted into the session queue.
        event_id:
          type: string
          description: >-
            Identifier assigned when the input was accepted. Equal to the
            containing input_id.
        event_type:
          type: string
          const: message
          description: Always message.
        inference_config:
          type: object
          additionalProperties: false
          description: Always empty because a queued input has not run model inference.
        role:
          type: string
          enum:
            - user
            - system
          description: 'Message role: user for caller input or system for a system message.'
        schema_version:
          type: integer
          const: 1
          description: Event schema version.
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - event_id
        - schema_version
        - event_type
        - actor
        - role
        - content
        - inference_config
      type: object
      additionalProperties: false
    PlatformSafeJsonValue:
      description: >-
        A JSON value whose integer members stay within the exact ECMAScript
        safe-integer range at every nesting level.
      oneOf:
        - type: 'null'
        - type: boolean
        - type: string
        - type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        - type: number
          not:
            type: integer
        - type: array
          items:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
        - additionalProperties:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
          type: object
    PendingSessionInputContentBlock:
      description: >-
        One top-level queued-message content block after storage normalization.
        Read-time signed URLs are never persisted in the queue.
      properties:
        byte_size:
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        content:
          items:
            $ref: '#/components/schemas/PendingSessionInputNestedContentBlock'
          type: array
        context:
          type: string
        data:
          type: string
        encrypted_content:
          type: string
        height:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        id:
          type: string
        input:
          additionalProperties:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
          type: object
        is_error:
          type: boolean
        media_type:
          type: string
        name:
          type: string
        omitted_bytes:
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        payload:
          $ref: '#/components/schemas/PlatformSafeJsonValue'
        provider:
          type: string
        provider_payload:
          $ref: '#/components/schemas/PlatformSafeJsonValue'
        redacted:
          type: boolean
        semantic_hint:
          type: string
        sha256:
          type: string
        signature:
          type: string
        source:
          $ref: '#/components/schemas/ContentBlockSource'
        summary:
          items:
            $ref: '#/components/schemas/PendingSessionInputNestedContentBlock'
          type: array
        text:
          type: string
        title:
          type: string
        tool_use_id:
          type: string
        type:
          type: string
          not:
            const: document
          description: Queued block type. Document blocks are normalized before queueing.
        uri:
          type: string
        width:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - type
      type: object
      additionalProperties: false
      allOf:
        - anyOf:
            - not:
                required:
                  - source
            - properties:
                type:
                  enum:
                    - text
                    - image
        - anyOf:
            - not:
                required:
                  - source
            - properties:
                type:
                  not:
                    const: image
            - required:
                - uri
    PendingSessionInputNestedContentBlock:
      description: >-
        One nested queued-message content block after storage normalization.
        File sources and read-time signed URLs are not valid when nested.
      properties:
        byte_size:
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        content:
          items:
            $ref: '#/components/schemas/PendingSessionInputNestedContentBlock'
          type: array
        context:
          type: string
        data:
          type: string
        encrypted_content:
          type: string
        height:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        id:
          type: string
        input:
          additionalProperties:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
          type: object
        is_error:
          type: boolean
        media_type:
          type: string
        name:
          type: string
        omitted_bytes:
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        payload:
          $ref: '#/components/schemas/PlatformSafeJsonValue'
        provider:
          type: string
        provider_payload:
          $ref: '#/components/schemas/PlatformSafeJsonValue'
        redacted:
          type: boolean
        semantic_hint:
          type: string
        sha256:
          type: string
        signature:
          type: string
        summary:
          items:
            $ref: '#/components/schemas/PendingSessionInputNestedContentBlock'
          type: array
        text:
          type: string
        title:
          type: string
        tool_use_id:
          type: string
        type:
          type: string
          not:
            const: document
          description: Queued block type. Document blocks are normalized before queueing.
        uri:
          type: string
        width:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - type
      type: object
      additionalProperties: false
    ContentBlockSource:
      description: >-
        Where a user-sent image or document block takes its bytes from when the
        caller names a file instead of carrying them: a file from the
        organization's catalog, read and copied into the session when the
        message is accepted, so the block the transcript keeps names both the
        source and the copy.
      properties:
        file_id:
          type: string
          minLength: 1
          description: Nonempty id of an unexpired file in the caller's organization.
        type:
          type: string
          const: file
          description: Always file.
      required:
        - type
        - file_id
      type: object
      additionalProperties: false
  headers:
    RecursionOrganizationId:
      description: Organization id resolved for this request.
      schema:
        type: string
        minLength: 1
    RecursionTenantId:
      description: Tenant id resolved for this request.
      schema:
        type: string
        minLength: 1
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recursion API key, created in the console under API keys.

````