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

# List Task Comments

> List comments on a task, oldest first, paginated.

Returns:
    Comments ordered oldest first, capped at ``limit``.

Raises:
    NotFoundError: If task not found.



## OpenAPI

````yaml https://api.pragmatiks.io/openapi.json get /agents/tasks/{task_id}/comments
openapi: 3.1.0
info:
  title: Pragma API
  version: 0.1.0
servers: []
security: []
paths:
  /agents/tasks/{task_id}/comments:
    get:
      tags:
        - tasks
      summary: List Task Comments
      description: |-
        List comments on a task, oldest first, paginated.

        Returns:
            Comments ordered oldest first, capped at ``limit``.

        Raises:
            NotFoundError: If task not found.
      operationId: tasks-list_task_comments
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            description: Maximum comments to return
            default: 50
            title: Limit
          description: Maximum comments to return
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Composite cursor '<iso-created_at>|<comment-id>'; returns comments
              strictly after this point under (created_at ASC, id ASC).
            title: Cursor
          description: >-
            Composite cursor '<iso-created_at>|<comment-id>'; returns comments
            strictly after this point under (created_at ASC, id ASC).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TaskComment'
                title: Response Tasks-List Task Comments
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TaskComment:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        task_id:
          type: string
          title: Task Id
        body:
          type: string
          title: Body
        author_type:
          $ref: '#/components/schemas/CommentAuthorType'
        author_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Author User Id
        author_instance_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Author Instance Id
        author_agent_type_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Author Agent Type Id
        edited:
          type: boolean
          title: Edited
          default: false
      type: object
      required:
        - task_id
        - body
        - author_type
      title: TaskComment
      description: |-
        A markdown comment on a task.

        Comments live inside each organization's SurrealDB namespace —
        the namespace is the organization boundary, so no per-record
        ``organization_id`` field is carried on the row.

        Comments are first-class graph nodes connected to tasks via
        ``has_comment`` edges. Authorship is recorded as graph edges as well:
        user comments use ``authored_by_user`` and agent comments persist a
        dual ``authored_by_instance`` plus ``authored_by_type`` pair so that
        type-level attribution survives instance garbage collection.

        Attributes:
            id: SurrealDB record ID (populated by database).
            task_id: Task this comment belongs to.
            body: Markdown body of the comment.
            author_type: Whether the author is a user or an agent.
            author_user_id: User ID when ``author_type`` is ``user``.
            author_instance_id: Agent instance ID when ``author_type`` is ``agent``.
            author_agent_type_id: Agent type ID when ``author_type`` is ``agent``.
            edited: True after at least one update.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CommentAuthorType:
      type: string
      enum:
        - user
        - agent
      title: CommentAuthorType
      description: Source of a task comment.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````