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

# List active runs for conversation sessions

> Returns the newest non-terminal run for each supplied conversation thread id, scoped to the authenticated user and org.

**Requires:** `agents:read`



## OpenAPI

````yaml https://api.getmodus.com/openapi.json post /agent/v1/runs/active-by-session
openapi: 3.0.3
info:
  title: Modus Public API
  version: 1.0.0
servers: []
security:
  - bearerAuth: []
tags:
  - name: Scopes
    description: Create, configure, deploy, and manage scopes.
  - name: Scopes · Conversations
    description: Read scope conversation threads.
  - name: Scopes · Supervision
    description: Scope supervision sub-resource.
  - name: Scopes · Memories
    description: Long-term memory stored per scope.
  - name: Scopes · Chat
    description: Chat with a published scope.
  - name: Scopes · Context
    description: Compose a scope’s context without an LLM call.
  - name: Modus · Chat
    description: Chat with Modus — your org-wide assistant.
  - name: Modus · Conversations
    description: Read Modus and cross-scope conversation threads.
  - name: Modus · Context
    description: Compose full-environment context without an LLM call.
  - name: Workflows
    description: Create, configure, deploy, and manage workflows.
  - name: Workflows · Runs
    description: Inspect workflow run history.
  - name: Workflows · Interfaces
    description: Slack / MCP / Teams interface management.
  - name: Connections
    description: Read connected integrations.
  - name: Tools
    description: Catalog of tools/integrations a scope can select in its toolset.
  - name: Suggestions
    description: Approved suggested questions and first-party suggestion usage events.
  - name: Context
    description: Create and manage organization context items.
  - name: Usage
    description: Organization LLM usage reporting.
  - name: Users
    description: Organization and membership management.
  - name: Runs · Streaming
    description: 'Run lifecycle: stream, poll, resume, interrupt, and cancel executions.'
  - name: Scopes · Runs
    description: Run a published or draft scope.
  - name: Modus · Runs
    description: Run the Modus home agent.
paths:
  /agent/v1/runs/active-by-session:
    post:
      tags:
        - Runs · Streaming
      summary: List active runs for conversation sessions
      description: >-
        Returns the newest non-terminal run for each supplied conversation
        thread id, scoped to the authenticated user and org.


        **Requires:** `agents:read`
      operationId: RunLifecycleController_activeBySession
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActiveRunsBySessionDto'
      responses:
        '200':
          description: Newest non-terminal run for each supplied conversation thread id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveRunsBySessionResponseDto'
        '403':
          description: Authenticated, but the token lacks the required scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto1'
              example:
                error:
                  code: FORBIDDEN
                  status: PERMISSION_DENIED
                  message: 'Missing required scope(s): agents:read.'
                  requestId: req_01HQ7K8ABCDEFGHIJKLMNOPQRS
                  info:
                    missing:
                      - agents:read
      security:
        - bearerAuth: []
      servers:
        - url: https://agent.getmodus.com
components:
  schemas:
    ActiveRunsBySessionDto:
      type: object
      properties:
        sessionIds:
          description: Conversation thread ids to check for non-terminal runs.
          maxItems: 100
          type: array
          items:
            type: string
      required:
        - sessionIds
    ActiveRunsBySessionResponseDto:
      type: object
      properties:
        runs:
          type: array
          items:
            $ref: '#/components/schemas/ActiveConversationRunDto'
      required:
        - runs
    ErrorResponseDto1:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorEnvelopeDto1'
      required:
        - error
    ActiveConversationRunDto:
      type: object
      properties:
        runId:
          type: string
          description: Run identifier.
        sessionId:
          type: string
          description: Conversation thread id.
        status:
          description: Current non-terminal run status.
          allOf:
            - $ref: '#/components/schemas/ActiveConversationRunStatus'
        message:
          type: string
          description: User message that started the run.
        createdAt:
          type: string
          description: Creation timestamp.
          format: date-time
        updatedAt:
          type: string
          description: Most recent update timestamp.
          format: date-time
      required:
        - runId
        - sessionId
        - status
        - createdAt
        - updatedAt
    ErrorEnvelopeDto1:
      type: object
      properties:
        code:
          description: Modus-specific machine code.
          allOf:
            - $ref: '#/components/schemas/ApiErrorCode'
        status:
          description: Canonical status string for the error.
          allOf:
            - $ref: '#/components/schemas/ApiErrorStatus'
        message:
          type: string
          example: Run was not found or you lack permission.
        requestId:
          type: string
          example: req_01HQ7K8ABCDEFGHIJKLMNOPQRS
        info:
          type: object
          description: Optional domain-specific context. Shape varies per endpoint.
          additionalProperties: true
          example:
            runId: run_abc123
      required:
        - code
        - status
        - message
        - requestId
    ActiveConversationRunStatus:
      type: string
      enum:
        - queued
        - pending
        - running
      description: Current non-terminal run status.
    ApiErrorCode:
      type: string
      enum:
        - VALIDATION
        - BAD_REQUEST
        - UNAUTHORIZED
        - FORBIDDEN
        - NOT_FOUND
        - CONFLICT
        - RATE_LIMITED
        - INTERNAL_ERROR
      description: Modus-specific machine code.
    ApiErrorStatus:
      type: string
      enum:
        - INVALID_ARGUMENT
        - UNAUTHENTICATED
        - PERMISSION_DENIED
        - NOT_FOUND
        - ALREADY_EXISTS
        - RESOURCE_EXHAUSTED
        - INTERNAL
      description: Canonical status string for the error.
  securitySchemes:
    bearerAuth:
      scheme: bearer
      bearerFormat: Modus PAT (modus_<orgUuid>_<prefix>_<secret>) or OAuth 2.1 access token
      type: http
      description: >-
        A Modus personal access token (`modus_<orgUuid>_<prefix>_<secret>`) or
        an OAuth 2.1 access token, sent as `Authorization: Bearer <token>`.

````