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

# Replace task settings



## OpenAPI

````yaml api-reference/openapi.v1.json PUT /tasks/{taskID}
openapi: 3.1.0
info:
  title: Aether Public API
  version: 0.1.0
  description: >-
    The versioned, public Aether REST API. Authenticate with an `aether_`
    platform API key or a session token.
servers:
  - url: https://api.runaether.dev/v1
security:
  - bearerAuth: []
paths:
  /tasks/{taskID}:
    put:
      tags:
        - tasks
      summary: Replace task settings
      operationId: updateTask
      parameters:
        - in: path
          name: taskID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                discriminator:
                  mapping:
                    awaiting_input:
                      $ref: '#/components/schemas/TaskAwaitingInputWithActivity'
                    errored:
                      $ref: '#/components/schemas/TaskErroredWithActivity'
                    processing:
                      $ref: '#/components/schemas/TaskProcessingWithActivity'
                    queued:
                      $ref: '#/components/schemas/TaskQueuedWithActivity'
                  propertyName: status
                oneOf:
                  - $ref: '#/components/schemas/TaskQueuedWithActivity'
                  - $ref: '#/components/schemas/TaskProcessingWithActivity'
                  - $ref: '#/components/schemas/TaskAwaitingInputWithActivity'
                  - $ref: '#/components/schemas/TaskErroredWithActivity'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    UpdateTaskRequest:
      additionalProperties: false
      properties:
        agent_type:
          enum:
            - codex
            - claude-code
            - opencode
            - cursor
          type: string
        auto_fix_ci:
          type: boolean
        auto_fix_pr_comments:
          type: boolean
        auto_rebase:
          type: boolean
        interaction_mode:
          enum:
            - default
            - plan
          type: string
        model:
          minLength: 1
          type: string
        reasoning_effort:
          enum:
            - ultra
            - max
            - xhigh
            - high
            - medium
            - low
            - ultrathink
            - ultracode
            - none
          type:
            - string
            - 'null'
      required:
        - agent_type
        - model
        - interaction_mode
        - reasoning_effort
        - auto_fix_ci
        - auto_fix_pr_comments
        - auto_rebase
      type: object
    TaskAwaitingInputWithActivity:
      additionalProperties: false
      properties:
        activity_items:
          items:
            $ref: '#/components/schemas/TaskActivityItem'
          type: array
        agent_segments:
          items:
            $ref: '#/components/schemas/TaskAgentSegment'
          type: array
        agent_type:
          enum:
            - codex
            - claude-code
            - opencode
            - cursor
          type: string
        archived_at:
          minLength: 1
          type:
            - string
            - 'null'
        auto_fix_ci:
          type: boolean
        auto_fix_pr_comments:
          type: boolean
        auto_rebase:
          type: boolean
        awaiting_input:
          $ref: '#/components/schemas/TaskAwaitingInputPayload'
        created_at:
          minLength: 1
          type: string
        display_status:
          enum:
            - running
            - awaiting_input
            - awaiting_ci
            - merged
            - unmerged
            - errored
            - archived
          type: string
        feed_updated_at:
          minLength: 1
          type: string
        hardware:
          $ref: '#/components/schemas/HardwareConfig'
        head_branch:
          minLength: 1
          type: string
        id:
          minLength: 1
          type: string
        interaction_mode:
          enum:
            - default
            - plan
          type: string
        last_error:
          type:
            - string
            - 'null'
        latest_sequence:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        latest_status_message:
          type:
            - string
            - 'null'
        latest_status_source:
          type:
            - string
            - 'null'
        model:
          minLength: 1
          type: string
        name:
          minLength: 1
          type: string
        primary_pull_request:
          anyOf:
            - $ref: '#/components/schemas/TaskPullRequest'
            - type: 'null'
        project_id:
          minLength: 1
          type: string
        pull_requests:
          items:
            $ref: '#/components/schemas/TaskPullRequest'
          type: array
        reasoning_effort:
          enum:
            - ultra
            - max
            - xhigh
            - high
            - medium
            - low
            - ultrathink
            - ultracode
            - none
          type:
            - string
            - 'null'
        review_subject_pull_request:
          anyOf:
            - $ref: '#/components/schemas/TaskReviewSubjectPullRequest'
            - type: 'null'
        run_context:
          anyOf:
            - $ref: '#/components/schemas/TaskRunContext'
            - type: 'null'
        runtime_intervals:
          items:
            $ref: '#/components/schemas/TaskRuntimeInterval'
          type: array
        runtime_timing:
          $ref: '#/components/schemas/TaskRuntimeTiming'
        slash_commands:
          items:
            $ref: '#/components/schemas/TaskSlashCommand'
          type:
            - array
            - 'null'
        source:
          $ref: '#/components/schemas/TaskSource'
        source_metadata:
          additionalProperties: true
          properties: {}
          type:
            - object
            - 'null'
        status:
          enum:
            - awaiting_input
          type: string
        usage:
          $ref: '#/components/schemas/TaskUsage'
        user_id:
          minLength: 1
          type: string
      required:
        - id
        - project_id
        - user_id
        - name
        - agent_type
        - model
        - interaction_mode
        - auto_fix_ci
        - auto_fix_pr_comments
        - auto_rebase
        - status
        - display_status
        - pull_requests
        - primary_pull_request
        - review_subject_pull_request
        - usage
        - runtime_timing
        - hardware
        - source
        - created_at
        - feed_updated_at
        - run_context
        - awaiting_input
        - activity_items
      type: object
    TaskErroredWithActivity:
      additionalProperties: false
      properties:
        activity_items:
          items:
            $ref: '#/components/schemas/TaskActivityItem'
          type: array
        agent_segments:
          items:
            $ref: '#/components/schemas/TaskAgentSegment'
          type: array
        agent_type:
          enum:
            - codex
            - claude-code
            - opencode
            - cursor
          type: string
        archived_at:
          minLength: 1
          type:
            - string
            - 'null'
        auto_fix_ci:
          type: boolean
        auto_fix_pr_comments:
          type: boolean
        auto_rebase:
          type: boolean
        completed_at:
          minLength: 1
          type: string
        created_at:
          minLength: 1
          type: string
        display_status:
          enum:
            - running
            - awaiting_input
            - awaiting_ci
            - merged
            - unmerged
            - errored
            - archived
          type: string
        error:
          minLength: 1
          type: string
        feed_updated_at:
          minLength: 1
          type: string
        hardware:
          $ref: '#/components/schemas/HardwareConfig'
        head_branch:
          minLength: 1
          type: string
        id:
          minLength: 1
          type: string
        interaction_mode:
          enum:
            - default
            - plan
          type: string
        last_error:
          type:
            - string
            - 'null'
        latest_sequence:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        latest_status_message:
          type:
            - string
            - 'null'
        latest_status_source:
          type:
            - string
            - 'null'
        model:
          minLength: 1
          type: string
        name:
          minLength: 1
          type: string
        primary_pull_request:
          anyOf:
            - $ref: '#/components/schemas/TaskPullRequest'
            - type: 'null'
        project_id:
          minLength: 1
          type: string
        pull_requests:
          items:
            $ref: '#/components/schemas/TaskPullRequest'
          type: array
        reasoning_effort:
          enum:
            - ultra
            - max
            - xhigh
            - high
            - medium
            - low
            - ultrathink
            - ultracode
            - none
          type:
            - string
            - 'null'
        review_subject_pull_request:
          anyOf:
            - $ref: '#/components/schemas/TaskReviewSubjectPullRequest'
            - type: 'null'
        run_context:
          anyOf:
            - $ref: '#/components/schemas/TaskRunContext'
            - type: 'null'
        runtime_intervals:
          items:
            $ref: '#/components/schemas/TaskRuntimeInterval'
          type: array
        runtime_timing:
          $ref: '#/components/schemas/TaskRuntimeTiming'
        slash_commands:
          items:
            $ref: '#/components/schemas/TaskSlashCommand'
          type:
            - array
            - 'null'
        source:
          $ref: '#/components/schemas/TaskSource'
        source_metadata:
          additionalProperties: true
          properties: {}
          type:
            - object
            - 'null'
        status:
          enum:
            - errored
          type: string
        usage:
          $ref: '#/components/schemas/TaskUsage'
        user_id:
          minLength: 1
          type: string
      required:
        - id
        - project_id
        - user_id
        - name
        - agent_type
        - model
        - interaction_mode
        - auto_fix_ci
        - auto_fix_pr_comments
        - auto_rebase
        - status
        - display_status
        - pull_requests
        - primary_pull_request
        - review_subject_pull_request
        - usage
        - runtime_timing
        - hardware
        - source
        - created_at
        - feed_updated_at
        - run_context
        - error
        - completed_at
        - activity_items
      type: object
    TaskProcessingWithActivity:
      additionalProperties: false
      properties:
        activity_items:
          items:
            $ref: '#/components/schemas/TaskActivityItem'
          type: array
        agent_segments:
          items:
            $ref: '#/components/schemas/TaskAgentSegment'
          type: array
        agent_type:
          enum:
            - codex
            - claude-code
            - opencode
            - cursor
          type: string
        archived_at:
          minLength: 1
          type:
            - string
            - 'null'
        auto_fix_ci:
          type: boolean
        auto_fix_pr_comments:
          type: boolean
        auto_rebase:
          type: boolean
        created_at:
          minLength: 1
          type: string
        display_status:
          enum:
            - running
            - awaiting_input
            - awaiting_ci
            - merged
            - unmerged
            - errored
            - archived
          type: string
        feed_updated_at:
          minLength: 1
          type: string
        hardware:
          $ref: '#/components/schemas/HardwareConfig'
        head_branch:
          minLength: 1
          type: string
        id:
          minLength: 1
          type: string
        interaction_mode:
          enum:
            - default
            - plan
          type: string
        last_error:
          type:
            - string
            - 'null'
        latest_sequence:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        latest_status_message:
          type:
            - string
            - 'null'
        latest_status_source:
          type:
            - string
            - 'null'
        model:
          minLength: 1
          type: string
        name:
          minLength: 1
          type: string
        primary_pull_request:
          anyOf:
            - $ref: '#/components/schemas/TaskPullRequest'
            - type: 'null'
        project_id:
          minLength: 1
          type: string
        pull_requests:
          items:
            $ref: '#/components/schemas/TaskPullRequest'
          type: array
        reasoning_effort:
          enum:
            - ultra
            - max
            - xhigh
            - high
            - medium
            - low
            - ultrathink
            - ultracode
            - none
          type:
            - string
            - 'null'
        review_subject_pull_request:
          anyOf:
            - $ref: '#/components/schemas/TaskReviewSubjectPullRequest'
            - type: 'null'
        run_context:
          $ref: '#/components/schemas/TaskRunContext'
        runtime_intervals:
          items:
            $ref: '#/components/schemas/TaskRuntimeInterval'
          type: array
        runtime_timing:
          $ref: '#/components/schemas/TaskRuntimeTiming'
        slash_commands:
          items:
            $ref: '#/components/schemas/TaskSlashCommand'
          type:
            - array
            - 'null'
        source:
          $ref: '#/components/schemas/TaskSource'
        source_metadata:
          additionalProperties: true
          properties: {}
          type:
            - object
            - 'null'
        status:
          enum:
            - processing
          type: string
        usage:
          $ref: '#/components/schemas/TaskUsage'
        user_id:
          minLength: 1
          type: string
      required:
        - id
        - project_id
        - user_id
        - name
        - agent_type
        - model
        - interaction_mode
        - auto_fix_ci
        - auto_fix_pr_comments
        - auto_rebase
        - status
        - display_status
        - pull_requests
        - primary_pull_request
        - review_subject_pull_request
        - usage
        - runtime_timing
        - hardware
        - source
        - created_at
        - feed_updated_at
        - run_context
        - activity_items
      type: object
    TaskQueuedWithActivity:
      additionalProperties: false
      properties:
        activity_items:
          items:
            $ref: '#/components/schemas/TaskActivityItem'
          type: array
        agent_segments:
          items:
            $ref: '#/components/schemas/TaskAgentSegment'
          type: array
        agent_type:
          enum:
            - codex
            - claude-code
            - opencode
            - cursor
          type: string
        archived_at:
          minLength: 1
          type:
            - string
            - 'null'
        auto_fix_ci:
          type: boolean
        auto_fix_pr_comments:
          type: boolean
        auto_rebase:
          type: boolean
        created_at:
          minLength: 1
          type: string
        display_status:
          enum:
            - running
            - awaiting_input
            - awaiting_ci
            - merged
            - unmerged
            - errored
            - archived
          type: string
        feed_updated_at:
          minLength: 1
          type: string
        hardware:
          $ref: '#/components/schemas/HardwareConfig'
        head_branch:
          minLength: 1
          type: string
        id:
          minLength: 1
          type: string
        interaction_mode:
          enum:
            - default
            - plan
          type: string
        last_error:
          type:
            - string
            - 'null'
        latest_sequence:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        latest_status_message:
          type:
            - string
            - 'null'
        latest_status_source:
          type:
            - string
            - 'null'
        model:
          minLength: 1
          type: string
        name:
          minLength: 1
          type: string
        primary_pull_request:
          anyOf:
            - $ref: '#/components/schemas/TaskPullRequest'
            - type: 'null'
        project_id:
          minLength: 1
          type: string
        pull_requests:
          items:
            $ref: '#/components/schemas/TaskPullRequest'
          type: array
        reasoning_effort:
          enum:
            - ultra
            - max
            - xhigh
            - high
            - medium
            - low
            - ultrathink
            - ultracode
            - none
          type:
            - string
            - 'null'
        review_subject_pull_request:
          anyOf:
            - $ref: '#/components/schemas/TaskReviewSubjectPullRequest'
            - type: 'null'
        run_context:
          anyOf:
            - $ref: '#/components/schemas/TaskRunContext'
            - type: 'null'
        runtime_intervals:
          items:
            $ref: '#/components/schemas/TaskRuntimeInterval'
          type: array
        runtime_timing:
          $ref: '#/components/schemas/TaskRuntimeTiming'
        slash_commands:
          items:
            $ref: '#/components/schemas/TaskSlashCommand'
          type:
            - array
            - 'null'
        source:
          $ref: '#/components/schemas/TaskSource'
        source_metadata:
          additionalProperties: true
          properties: {}
          type:
            - object
            - 'null'
        status:
          enum:
            - queued
          type: string
        usage:
          $ref: '#/components/schemas/TaskUsage'
        user_id:
          minLength: 1
          type: string
      required:
        - id
        - project_id
        - user_id
        - name
        - agent_type
        - model
        - interaction_mode
        - auto_fix_ci
        - auto_fix_pr_comments
        - auto_rebase
        - status
        - display_status
        - pull_requests
        - primary_pull_request
        - review_subject_pull_request
        - usage
        - runtime_timing
        - hardware
        - source
        - created_at
        - feed_updated_at
        - run_context
        - activity_items
      type: object
    ErrorResponse:
      additionalProperties: false
      properties:
        code:
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
      type: object
    TaskActivityItem:
      discriminator:
        mapping:
          ci_failed:
            $ref: '#/components/schemas/TaskActivityCIFailed'
          ci_passed:
            $ref: '#/components/schemas/TaskActivityCIPassed'
          done:
            $ref: '#/components/schemas/TaskActivityDone'
          error:
            $ref: '#/components/schemas/TaskActivityError'
          question:
            $ref: '#/components/schemas/TaskActivityQuestion'
          start_task:
            $ref: '#/components/schemas/TaskActivityStartTask'
          workspace_lifecycle:
            $ref: '#/components/schemas/TaskActivityWorkspaceLifecycle'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/TaskActivityDone'
        - $ref: '#/components/schemas/TaskActivityError'
        - $ref: '#/components/schemas/TaskActivityQuestion'
        - $ref: '#/components/schemas/TaskActivityStartTask'
        - $ref: '#/components/schemas/TaskActivityWorkspaceLifecycle'
        - $ref: '#/components/schemas/TaskActivityCIPassed'
        - $ref: '#/components/schemas/TaskActivityCIFailed'
    TaskAgentSegment:
      additionalProperties: false
      properties:
        end_reason:
          enum:
            - completed
            - awaiting_input
            - errored
            - interrupted
          type:
            - string
            - 'null'
        ended_at:
          minLength: 1
          type:
            - string
            - 'null'
        id:
          minLength: 1
          type: string
        started_at:
          minLength: 1
          type: string
        task_id:
          minLength: 1
          type: string
        tokens_in:
          format: int64
          minimum: 0
          type: integer
        tokens_out:
          format: int64
          minimum: 0
          type: integer
      required:
        - id
        - task_id
        - started_at
        - tokens_in
        - tokens_out
      type: object
    TaskAwaitingInputPayload:
      discriminator:
        mapping:
          message:
            $ref: '#/components/schemas/TaskAwaitingInputMessage'
          plan:
            $ref: '#/components/schemas/TaskAwaitingInputPlan'
          questions:
            $ref: '#/components/schemas/TaskAwaitingInputQuestions'
        propertyName: kind
      oneOf:
        - $ref: '#/components/schemas/TaskAwaitingInputMessage'
        - $ref: '#/components/schemas/TaskAwaitingInputQuestions'
        - $ref: '#/components/schemas/TaskAwaitingInputPlan'
    HardwareConfig:
      additionalProperties: false
      properties:
        cpu_kind:
          enum:
            - shared
            - performance
          type: string
        cpus:
          format: int64
          maximum: 16
          minimum: 1
          type: integer
        gpu_kind:
          enum:
            - a10
            - l40s
            - a100-40gb
            - a100-80gb
          type:
            - string
            - 'null'
        memory_mb:
          format: int64
          maximum: 32768
          minimum: 256
          type: integer
        volume_size_gb:
          format: int64
          maximum: 500
          minimum: 1
          type: integer
      required:
        - cpu_kind
        - cpus
        - memory_mb
        - volume_size_gb
        - gpu_kind
      type: object
    TaskPullRequest:
      additionalProperties: false
      properties:
        additions:
          format: int64
          minimum: 0
          type: integer
        branch_name:
          minLength: 1
          type: string
        checks_failed:
          format: int64
          minimum: 0
          type: integer
        checks_passed:
          format: int64
          minimum: 0
          type: integer
        checks_total:
          format: int64
          minimum: 0
          type: integer
        ci_status:
          enum:
            - pending
            - passed
            - failed
          type: string
        commits:
          format: int64
          minimum: 0
          type: integer
        deletions:
          format: int64
          minimum: 0
          type: integer
        html_url:
          minLength: 1
          type: string
        lines_changed:
          format: int64
          minimum: 0
          type: integer
        pr_number:
          format: int64
          minimum: 1
          type: integer
        state:
          enum:
            - open
            - closed
            - merged
          type: string
        title:
          type: string
      required:
        - pr_number
        - html_url
        - title
        - checks_passed
        - checks_failed
        - checks_total
        - commits
        - lines_changed
        - additions
        - deletions
      type: object
    TaskReviewSubjectPullRequest:
      additionalProperties: false
      properties:
        additions:
          format: int64
          minimum: 0
          type: integer
        branch_name:
          minLength: 1
          type: string
        checks_failed:
          format: int64
          minimum: 0
          type: integer
        checks_passed:
          format: int64
          minimum: 0
          type: integer
        checks_total:
          format: int64
          minimum: 0
          type: integer
        ci_status:
          enum:
            - pending
            - passed
            - failed
          type: string
        commits:
          format: int64
          minimum: 0
          type: integer
        deletions:
          format: int64
          minimum: 0
          type: integer
        html_url:
          minLength: 1
          type: string
        lines_changed:
          format: int64
          minimum: 0
          type: integer
        pr_number:
          format: int64
          minimum: 1
          type: integer
        review_check_conclusion:
          enum:
            - success
            - failure
            - cancelled
            - neutral
          type: string
        review_trigger:
          enum:
            - automatic
            - comment_command
          type: string
        state:
          enum:
            - open
            - closed
            - merged
          type: string
        title:
          type: string
      required:
        - pr_number
        - html_url
        - title
        - checks_passed
        - checks_failed
        - checks_total
        - commits
        - lines_changed
        - additions
        - deletions
        - review_trigger
      type: object
    TaskRunContext:
      additionalProperties: false
      properties:
        started_at:
          minLength: 1
          type: string
        workspace_id:
          minLength: 1
          type: string
      required:
        - workspace_id
        - started_at
      type: object
    TaskRuntimeInterval:
      additionalProperties: false
      properties:
        cpu_kind:
          enum:
            - shared
            - performance
          type:
            - string
            - 'null'
        cpus:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        end_reason:
          enum:
            - halted
            - terminated
          type:
            - string
            - 'null'
        ended_at:
          minLength: 1
          type:
            - string
            - 'null'
        gpu_kind:
          enum:
            - a10
            - l40s
            - a100-40gb
            - a100-80gb
          type:
            - string
            - 'null'
        id:
          minLength: 1
          type: string
        machine_id:
          minLength: 1
          type: string
        memory_mb:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        started_at:
          minLength: 1
          type: string
        task_id:
          minLength: 1
          type: string
        volume_size_gb:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        workspace_id:
          minLength: 1
          type:
            - string
            - 'null'
      required:
        - id
        - task_id
        - machine_id
        - started_at
      type: object
    TaskRuntimeTiming:
      discriminator:
        mapping:
          active:
            $ref: '#/components/schemas/TaskRuntimeTimingActive'
          inactive:
            $ref: '#/components/schemas/TaskRuntimeTimingInactive'
        propertyName: state
      oneOf:
        - $ref: '#/components/schemas/TaskRuntimeTimingInactive'
        - $ref: '#/components/schemas/TaskRuntimeTimingActive'
    TaskSlashCommand:
      additionalProperties: true
      properties:
        description:
          type: string
        input:
          additionalProperties: true
          properties:
            hint:
              type: string
          required:
            - hint
          type: object
        name:
          type: string
      required:
        - name
        - description
      type: object
    TaskSource:
      enum:
        - manual
        - ci
        - sentry
        - linear
        - slack
        - automation
        - pr_review
      type: string
    TaskUsage:
      additionalProperties: false
      properties:
        tokens_in:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        tokens_out:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        vm_uptime_seconds:
          format: int64
          minimum: 0
          type: integer
      required:
        - tokens_in
        - tokens_out
        - vm_uptime_seconds
      type: object
    TaskActivityCIFailed:
      additionalProperties: false
      properties:
        created_at:
          minLength: 1
          type: string
        data:
          anyOf:
            - $ref: '#/components/schemas/CIFailedEventData'
            - type: 'null'
        event_id:
          minLength: 1
          type: string
        id:
          minLength: 1
          type: string
        sequence:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        task_id:
          minLength: 1
          type: string
        type:
          enum:
            - ci_failed
          type: string
      required:
        - id
        - task_id
        - created_at
        - sequence
        - type
        - data
      type: object
    TaskActivityCIPassed:
      additionalProperties: false
      properties:
        created_at:
          minLength: 1
          type: string
        data:
          anyOf:
            - $ref: '#/components/schemas/CIPassedEventData'
            - type: 'null'
        event_id:
          minLength: 1
          type: string
        id:
          minLength: 1
          type: string
        sequence:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        task_id:
          minLength: 1
          type: string
        type:
          enum:
            - ci_passed
          type: string
      required:
        - id
        - task_id
        - created_at
        - sequence
        - type
        - data
      type: object
    TaskActivityDone:
      additionalProperties: false
      properties:
        created_at:
          minLength: 1
          type: string
        data:
          anyOf:
            - $ref: '#/components/schemas/DoneEventData'
            - type: 'null'
        event_id:
          minLength: 1
          type: string
        id:
          minLength: 1
          type: string
        sequence:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        task_id:
          minLength: 1
          type: string
        type:
          enum:
            - done
          type: string
      required:
        - id
        - task_id
        - created_at
        - sequence
        - type
        - data
      type: object
    TaskActivityError:
      additionalProperties: false
      properties:
        created_at:
          minLength: 1
          type: string
        data:
          anyOf:
            - $ref: '#/components/schemas/ErrorEventData'
            - type: 'null'
        event_id:
          minLength: 1
          type: string
        id:
          minLength: 1
          type: string
        sequence:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        task_id:
          minLength: 1
          type: string
        type:
          enum:
            - error
          type: string
      required:
        - id
        - task_id
        - created_at
        - sequence
        - type
        - data
      type: object
    TaskActivityQuestion:
      additionalProperties: false
      properties:
        created_at:
          minLength: 1
          type: string
        data:
          anyOf:
            - $ref: '#/components/schemas/QuestionEventData'
            - type: 'null'
        event_id:
          minLength: 1
          type: string
        id:
          minLength: 1
          type: string
        sequence:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        task_id:
          minLength: 1
          type: string
        type:
          enum:
            - question
          type: string
      required:
        - id
        - task_id
        - created_at
        - sequence
        - type
        - data
      type: object
    TaskActivityStartTask:
      additionalProperties: false
      properties:
        created_at:
          minLength: 1
          type: string
        data:
          additionalProperties: true
          properties: {}
          type:
            - object
            - 'null'
        event_id:
          minLength: 1
          type: string
        id:
          minLength: 1
          type: string
        sequence:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        task_id:
          minLength: 1
          type: string
        type:
          enum:
            - start_task
          type: string
      required:
        - id
        - task_id
        - created_at
        - sequence
        - type
        - data
      type: object
    TaskActivityWorkspaceLifecycle:
      additionalProperties: false
      properties:
        created_at:
          minLength: 1
          type: string
        data:
          anyOf:
            - $ref: '#/components/schemas/WorkspaceLifecycleEventData'
            - type: 'null'
        event_id:
          minLength: 1
          type: string
        id:
          minLength: 1
          type: string
        sequence:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        task_id:
          minLength: 1
          type: string
        type:
          enum:
            - workspace_lifecycle
          type: string
      required:
        - id
        - task_id
        - created_at
        - sequence
        - type
        - data
      type: object
    TaskAwaitingInputMessage:
      additionalProperties: false
      properties:
        kind:
          enum:
            - message
          type: string
      required:
        - kind
      type: object
    TaskAwaitingInputPlan:
      additionalProperties: false
      properties:
        input:
          $ref: '#/components/schemas/ProposePlanToolInput'
        kind:
          enum:
            - plan
          type: string
        tool_id:
          minLength: 1
          type: string
      required:
        - kind
        - tool_id
        - input
      type: object
    TaskAwaitingInputQuestions:
      additionalProperties: false
      properties:
        input:
          $ref: '#/components/schemas/AskUserToolInput'
        kind:
          enum:
            - questions
          type: string
        tool_id:
          minLength: 1
          type: string
      required:
        - kind
        - tool_id
        - input
      type: object
    TaskRuntimeTimingActive:
      additionalProperties: false
      properties:
        active_started_at:
          minLength: 1
          type: string
        state:
          enum:
            - active
          type: string
      required:
        - state
        - active_started_at
      type: object
    TaskRuntimeTimingInactive:
      additionalProperties: false
      properties:
        state:
          enum:
            - inactive
          type: string
      required:
        - state
      type: object
    CIFailedEventData:
      additionalProperties: false
      properties:
        check_suite_id:
          format: int64
          minimum: 0
          type: integer
        conclusion:
          enum:
            - failure
          type: string
        failed_checks:
          items:
            additionalProperties: false
            properties:
              conclusion:
                minLength: 1
                type: string
              id:
                format: int64
                minimum: 0
                type: integer
              name:
                minLength: 1
                type: string
            required:
              - name
              - id
              - conclusion
            type: object
          type: array
        head_sha:
          minLength: 1
          type: string
        repo:
          minLength: 1
          type: string
      required:
        - head_sha
        - conclusion
        - repo
        - failed_checks
      type: object
    CIPassedEventData:
      additionalProperties: false
      properties:
        check_suite_id:
          format: int64
          minimum: 0
          type: integer
        conclusion:
          enum:
            - success
          type: string
        head_sha:
          minLength: 1
          type: string
        repo:
          minLength: 1
          type: string
      required:
        - check_suite_id
        - head_sha
        - conclusion
        - repo
      type: object
    DoneEventData:
      additionalProperties: false
      properties:
        message_id:
          minLength: 1
          type: string
        usage:
          $ref: '#/components/schemas/UsageStats'
      required:
        - message_id
      type: object
    ErrorEventData:
      additionalProperties: false
      properties:
        failure_kind:
          enum:
            - auth_expired
            - out_of_credits
            - provider_overloaded
            - subscription_disabled
            - provider_error
          type: string
        message:
          minLength: 1
          type: string
        usage:
          $ref: '#/components/schemas/UsageStats'
      required:
        - message
      type: object
    QuestionEventData:
      discriminator:
        mapping:
          ask_user:
            $ref: '#/components/schemas/QuestionEventDataAskUser'
          propose_plan:
            $ref: '#/components/schemas/QuestionEventDataProposePlan'
          stop_task:
            $ref: '#/components/schemas/QuestionEventDataStopTask'
        propertyName: toolName
      oneOf:
        - $ref: '#/components/schemas/QuestionEventDataAskUser'
        - $ref: '#/components/schemas/QuestionEventDataProposePlan'
        - $ref: '#/components/schemas/QuestionEventDataStopTask'
    WorkspaceLifecycleEventData:
      additionalProperties: false
      properties:
        message:
          minLength: 1
          type: string
        phase:
          enum:
            - starting
            - provisioning_machine
            - booting_workspace
            - preparing_workspace
            - starting_agent
            - ready
            - suspending
            - suspended
            - waiting_for_suspend
            - resuming
            - resumed
            - recovering
            - recovered
          type: string
      required:
        - phase
        - message
      type: object
    ProposePlanToolInput:
      additionalProperties: true
      properties:
        plan:
          type: string
        summary:
          type: string
      required:
        - summary
        - plan
      type: object
    AskUserToolInput:
      additionalProperties: true
      properties:
        questions:
          items:
            additionalProperties: true
            properties:
              multiSelect:
                type: boolean
              options:
                items:
                  additionalProperties: true
                  properties:
                    description:
                      type: string
                    label:
                      type: string
                  required:
                    - label
                  type: object
                type: array
              question:
                type: string
            required:
              - question
              - options
            type: object
          type: array
      required:
        - questions
      type: object
    UsageStats:
      additionalProperties: false
      properties:
        cachedInputTokens:
          format: int64
          minimum: 0
          type: integer
        cachedWriteTokens:
          format: int64
          minimum: 0
          type: integer
        cost:
          format: double
          minimum: 0
          type: number
        inputTokens:
          format: int64
          minimum: 0
          type: integer
        metadata:
          additionalProperties: true
          properties: {}
          type: object
        outputTokens:
          format: int64
          minimum: 0
          type: integer
        provider:
          enum:
            - codex
            - claude-code
            - opencode
            - cursor
          type: string
        reasoningOutputTokens:
          format: int64
          minimum: 0
          type: integer
        totalTokens:
          format: int64
          minimum: 0
          type: integer
      required:
        - inputTokens
        - outputTokens
      type: object
    QuestionEventDataAskUser:
      additionalProperties: false
      properties:
        input:
          $ref: '#/components/schemas/AskUserToolInput'
        toolId:
          minLength: 1
          type: string
        toolName:
          enum:
            - ask_user
          type: string
        usage:
          $ref: '#/components/schemas/UsageStats'
      required:
        - toolId
        - toolName
        - input
      type: object
    QuestionEventDataProposePlan:
      additionalProperties: false
      properties:
        input:
          $ref: '#/components/schemas/ProposePlanToolInput'
        toolId:
          minLength: 1
          type: string
        toolName:
          enum:
            - propose_plan
          type: string
        usage:
          $ref: '#/components/schemas/UsageStats'
      required:
        - toolId
        - toolName
        - input
      type: object
    QuestionEventDataStopTask:
      additionalProperties: false
      properties:
        input:
          additionalProperties: false
          properties: {}
          type: object
        toolId:
          minLength: 1
          type: string
        toolName:
          enum:
            - stop_task
          type: string
        usage:
          $ref: '#/components/schemas/UsageStats'
      required:
        - toolId
        - toolName
        - input
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````