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

# Get the pending decision

> Returns the decision the recovery agent is waiting on for a run (Decision Required), in the same shape as the `agent.decision_requested` webhook: `decision_id`, `answer_by`, `question`, `context`, `fields` with their ids and options, `free_text` and `respond_url`. Use it to answer a decision from a client that does not receive webhooks.

When no decision is pending, `decision` is `null`. If a decision on this run was already answered, `answered_decision_id` is its id. A key can only read decisions of runs in its own workspace.



## OpenAPI

````yaml run-api/run-api.yaml get /run/{session_id}/decision/pending
openapi: 3.1.0
info:
  title: CloudCruise Run API
  version: 0.1.0
  description: >-
    Endpoints for managing workflow executions, user interactions, and
    retrieving execution results.
servers:
  - url: https://api.cloudcruise.com
    description: CloudCruise Platform Production API Server
security:
  - AuthScheme: []
paths:
  /run/{session_id}/decision/pending:
    get:
      summary: Get the pending decision
      description: >-
        Returns the decision the recovery agent is waiting on for a run
        (Decision Required), in the same shape as the `agent.decision_requested`
        webhook: `decision_id`, `answer_by`, `question`, `context`, `fields`
        with their ids and options, `free_text` and `respond_url`. Use it to
        answer a decision from a client that does not receive webhooks.


        When no decision is pending, `decision` is `null`. If a decision on this
        run was already answered, `answered_decision_id` is its id. A key can
        only read decisions of runs in its own workspace.
      operationId: get_pending_decision
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            description: The session that asked the decision
      responses:
        '200':
          description: The pending decision, or `null`
          content:
            application/json:
              schema:
                type: object
                properties:
                  decision:
                    type:
                      - object
                      - 'null'
                    properties:
                      decision_id:
                        type: string
                      answer_by:
                        type: string
                        format: date-time
                      question:
                        type: string
                      context:
                        type: string
                      fields:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      free_text:
                        type: boolean
                      respond_url:
                        type: string
                  answered_decision_id:
                    type:
                      - string
                      - 'null'
        '401':
          description: Missing or invalid authentication token
        '403':
          description: The run belongs to another workspace
        '404':
          description: Run not found
components:
  securitySchemes:
    AuthScheme:
      type: apiKey
      name: cc-key
      in: header
      description: >-
        API key-based authentication. Provide your CloudCruise API key in the
        cc-key header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.