---
title: "List task runs"
method: GET
path: "/task-runs"
tags: ["Task Runs"]
---

# List task runs

`GET /task-runs`

Returns a paginated list of task runs. Supports filtering by agent, credential, source, task, workflow, status, result, and date range.

## Query parameters

- `limit` union
  - integer
  - string, int32
- `cursor` string
- `status` string[]
- `source_id` string[]
- `outcome` string[]
- `agent_id` string
- `credential_id` string
- `task_id` string
- `workflow_id` string
- `trigger_id` string
- `created_after` string, date-time
- `created_before` string, date-time
- `search` string

## Response `200`

OK

- PaginatedResponseOfListTaskRunData
  - `data` ListTaskRunData[] — Array of resource objects for the current page.
    - `id` string, required — Unique identifier for the task run, prefixed with `trun_`.
    - `object` string, required — Always `task_run`.
    - `status` string, required — Run status: `queued`, `running`, `canceling`, `interaction_required`, `review_required`, `completed`, `canceled`, or `failed`.
    - `result` string, nullable, required — Run result after completion: `success`, `failure`, or `unknown`. Null while running.
    - `task_id` string, required — The task that was executed. Prefixed with `task_`.
    - `trigger_id` string, nullable, required — The trigger that created this run, if any. Prefixed with `trg_`. `null` for runs created directly through the API.
    - `credential_id` string, nullable, required — The credential used for authentication, if any. Prefixed with `cred_`.
    - `session_id` string, nullable, required — The session this run executed within, if any. Prefixed with `sess_`.
    - `agent_id` string, required — The agent that executed this run. Prefixed with `agt_`.
    - `source_id` string, nullable, required — The source this run connected to, if any. Prefixed with `src_`.
    - `runtime_ms` union, required — Execution time in milliseconds.
      - integer
      - string, int32
    - `output` unknown, required
    - `errors` TaskRunError[], nullable, required — Error details if the run failed. Same structure as API-level errors.
      - `type` string, required — Error category (e.g. `source`, `auth`, `task`, `rate_limit`). Determines the class of failure.
      - `code` string, required — Machine-readable error code. Use this for programmatic handling.
      - `message` string, required — Human-readable explanation. Do not rely on this for logic — it may change.
      - `field` string, nullable — The input field that caused the error, when applicable.
      - `resolution` string, nullable — Hint for how an agent should recover (auth, docs URL, or backoff).
    - `interaction` unknown, required
    - `created_at` string, date-time, required — ISO 8601 timestamp of when the resource was created.
    - `updated_at` string, date-time, required — ISO 8601 timestamp of when the resource was last updated.
  - `has_more` boolean — `true` if there are more results beyond this page.
  - `next_cursor` string, nullable — Opaque cursor string to pass as the `cursor` query parameter on the next request. `null` when there are no more pages.
  - `request_id` string, nullable — Unique identifier for the API request.

## Other responses

- `400` — Bad request — validation error or malformed input.
- `401` — Unauthorized.
- `403` — Forbidden.
- `404` — Not found — the requested resource does not exist.
- `409` — Conflict — the request is valid but cannot be completed in the current state.
- `422` — Unprocessable content — the request body is understood but contains invalid values.
- `429` — Too many requests or session concurrency exceeded. Retry with backoff; honor Retry-After and RateLimit headers when present.
- `500` — Internal server error.

---

[API](https://skmtc.dev/deck/apis/deck-api.md) · [All operations](https://skmtc.dev/deck/apis/deck-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/deck/deck-api/revisions/eba6e2cc9351/schema)
