> ## 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 inputId becomes the event id on promotion, which is how a client follows a queued message into history. Interrupt and send a new instruction, or resume the session, to read the queue.



## OpenAPI

````yaml /recursion/openapi.yaml get /managed-agents/v2/sessions/{sessionId}/pending-inputs
openapi: 3.1.0
info:
  title: Managed Agents API
  version: 0.17.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/v2/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 inputId becomes
        the event id on promotion, which is how a client follows a queued
        message into history. Interrupt and send a new instruction, or resume
        the session, to read the queue.
      operationId: managedAgentsListSessionPendingInputsV2
      parameters:
        - description: >-
            Session id (UUID) returned by managedAgentsStartSessionV2 or
            managedAgentsListSessionsV2.
          in: path
          name: sessionId
          required: true
          schema:
            description: >-
              Session id (UUID) returned by managedAgentsStartSessionV2 or
              managedAgentsListSessionsV2.
            format: uuid
            type: string
        - $ref: '#/components/parameters/RecursionTenantId'
        - $ref: '#/components/parameters/RecursionOrganizationId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandaloneV2PendingInputsResponse'
          description: OK
          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:
        minLength: 1
        type: string
    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:
        minLength: 1
        type: string
  schemas:
    StandaloneV2PendingInputsResponse:
      properties:
        items:
          description: >-
            At most 32 inputs accepted but not yet read, in acceptance order.
            The queue is bounded when inputs are accepted.
          items:
            $ref: '#/components/schemas/StandaloneV2PendingSessionInput'
          maxItems: 32
          type: array
      required:
        - items
      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.
    StandaloneV2PendingSessionInput:
      properties:
        createdAt:
          description: RFC 3339 timestamp of when the input was accepted. Server-assigned.
          format: date-time
          type: string
        event:
          $ref: '#/components/schemas/StandaloneV2PendingSessionInputEvent'
          description: >-
            The message event this input becomes when promoted into the
            transcript.
        inputId:
          description: >-
            Identifier for this queued input (UUID). Becomes the event id once
            the input is promoted into the transcript.
          type: string
        kind:
          description: Always message. Interrupt controls are never stored in this queue.
          enum:
            - message
          type: string
      required:
        - inputId
        - kind
        - event
        - createdAt
      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.
    StandaloneV2PendingSessionInputEvent:
      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
              items:
                $ref: >-
                  #/components/schemas/StandaloneV2PendingSessionInputContentBlock
              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.
        eventId:
          type: string
          description: >-
            Identifier assigned when the input was accepted. Equal to the
            containing inputId.
        eventType:
          type: string
          const: message
          description: Always message.
        inferenceConfig:
          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.'
        schemaVersion:
          type: integer
          const: 1
          description: Event schema version.
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - eventId
        - schemaVersion
        - eventType
        - actor
        - role
        - content
        - inferenceConfig
      type: object
      description: >-
        The message event for one user input that has been accepted into a
        running session queue.
      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
    StandaloneV2PendingSessionInputContentBlock:
      properties:
        byteSize:
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        content:
          items:
            $ref: >-
              #/components/schemas/StandaloneV2PendingSessionInputNestedContentBlock
          type: array
        context:
          type: string
        data:
          type: string
        encryptedContent:
          type: string
        height:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        id:
          type: string
        input:
          additionalProperties:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
          type: object
        isError:
          type: boolean
        mediaType:
          type: string
        name:
          type: string
        omittedBytes:
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        payload:
          $ref: '#/components/schemas/PlatformSafeJsonValue'
        provider:
          type: string
        providerPayload:
          $ref: '#/components/schemas/PlatformSafeJsonValue'
        redacted:
          type: boolean
        semanticHint:
          type: string
        sha256:
          type: string
        signature:
          type: string
        source:
          $ref: '#/components/schemas/StandaloneV2ContentBlockSource'
        summary:
          items:
            $ref: >-
              #/components/schemas/StandaloneV2PendingSessionInputNestedContentBlock
          type: array
        text:
          type: string
        title:
          type: string
        toolUseId:
          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
      description: >-
        One top-level queued-message content block after storage normalization.
        Read-time signed URLs are never persisted in the queue.
    StandaloneV2PendingSessionInputNestedContentBlock:
      properties:
        byteSize:
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        content:
          items:
            $ref: >-
              #/components/schemas/StandaloneV2PendingSessionInputNestedContentBlock
          type: array
        context:
          type: string
        data:
          type: string
        encryptedContent:
          type: string
        height:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        id:
          type: string
        input:
          additionalProperties:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
          type: object
        isError:
          type: boolean
        mediaType:
          type: string
        name:
          type: string
        omittedBytes:
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        payload:
          $ref: '#/components/schemas/PlatformSafeJsonValue'
        provider:
          type: string
        providerPayload:
          $ref: '#/components/schemas/PlatformSafeJsonValue'
        redacted:
          type: boolean
        semanticHint:
          type: string
        sha256:
          type: string
        signature:
          type: string
        summary:
          items:
            $ref: >-
              #/components/schemas/StandaloneV2PendingSessionInputNestedContentBlock
          type: array
        text:
          type: string
        title:
          type: string
        toolUseId:
          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
      description: >-
        One nested queued-message content block after storage normalization.
        File sources and read-time signed URLs are not valid when nested.
    StandaloneV2ContentBlockSource:
      properties:
        fileId:
          description: >-
            The file whose bytes the block carries, from the caller's
            organization, unexpired.
          type: string
        type:
          description: Always file.
          enum:
            - file
          type: string
      required:
        - type
        - fileId
      type: object
      additionalProperties: false
  headers:
    RecursionOrganizationId:
      description: Organization id resolved for this request.
      schema:
        minLength: 1
        type: string
    RecursionTenantId:
      description: Tenant id resolved for this request.
      schema:
        minLength: 1
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recursion API key, created in the console under API keys.

````