# List background tasks owned by a session.

Source: <https://everruns.com/docs/api/operations/list_tasks/>

GET

/v1/sessions/{session\_id}/tasks

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sessions/example/tasks';
const options = {method: 'GET'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request GET \
  --url https://app.everruns.com/api/v1/sessions/example/tasks
```

* Production APIapp.everruns.com/api/v1/sessions/{session\_id}/tasks

## Parameters

### Path Parameters

**session\_id**

required

string

Session ID

### Query Parameters

**state**

string

Filter by state

**kind**

string

Filter by kind

## Responses

### 200

Session tasks

Media typeapplication/json

Array\<object>

A unit of background work owned by a session.

object

**artifacts**

Array\<object>

Typed link to something the task produced.

object

**name**

required

string

**path**

Session VFS path, when the artifact lives in the session filesystem.

string | null

**type**

required

Artifact type: “file”, “url”, “session”, “pr”, etc.

string

**url**

External URL, when the artifact lives elsewhere.

string | null

**attempt**

Execution attempt, starting at 1. Incremented on re-attach.

integer format: int32

**cancel\_requested\_at**

Cooperative cancel intent. A flag, not a state.

string | null format: date-time

**created\_at**

required

string format: date-time

**display\_name**

required

Human-readable label.

string

**error**

One of:

* object

  Terminal error detail. Timeout/rejection/orphaned are kinds, not states.

  object

  **kind**

  required

  string

  **message**

  required

  string

* null

  null

**finished\_at**

string | null format: date-time

**heartbeat\_at**

string | null format: date-time

**id**

required

`task_*` public ID.

string

**input\_request**

One of:

* object

  Pending ask while `awaiting_input`; cleared when answered.

  object

  **expected**

  Optional machine-readable description of the expected answer.

  object

  **id**

  required

  Stable ID referenced by the answering message’s `in_reply_to`.

  string

  **prompt**

  required

  Human/agent-readable prompt.

  string

* null

  null

**kind**

required

Task kind: “subagent”, “external\_agent”, “background\_tool”, “monitor”, …

string

**links**

Cross-references owned by a task.

object

**child\_session\_id**

Child session, for subagent-shaped tasks. Full transcript lives there.

string | null

**remote\_task\_id**

Remote task ID, for tasks wrapping an external protocol task (A2A).

string | null

**resource\_ids**

Session resources (sandboxes, browser sessions) this task holds.

Array\<string>

**progress**

One of:

* object

  Structured progress reported by background tools.

  object

  **current**

  integer | null format: int64

  **label**

  string | null

  **steps**

  Ordered checklist, for work that plans its steps up front (a thread’s assignment). Empty for plain counters.

  Array\<object>

  One checklist line in \[`BackgroundProgress::steps`].

  object

  **status**

  required

  State of one checklist line.

  string

  Allowed values: pending in\_progress done skipped

  **title**

  required

  string

  **total**

  integer | null format: int64

  **unit**

  string | null

* null

  null

**result\_path**

Machine result in the session VFS: `/.tasks/{task_id}/result.json`.

string | null

**root\_session\_id**

Root of the owning session’s delegation tree (EVE-680). Populated on API reads from the denormalized storage column so cross-session tooling (e.g. the Work view) can group a whole tree’s tasks by one id. `None` for a top-level session that is its own root, or when unavailable. Storage-derived, never client-settable on create.

string | null

**session\_id**

required

Owning session.

string

**spec**

Kind-specific input (instructions, tool args, external agent id).

object

**started\_at**

string | null format: date-time

**state**

required

Lifecycle state of a session task.

Three classes: active (`queued`, `running`), interrupted (`awaiting_input`, resumable), terminal (`succeeded`, `failed`, `canceled`). Timeout and rejection are `error.kind` values on `failed`, not states.

string

Allowed values: queued running awaiting\_input succeeded failed canceled

**state\_detail**

Short live status line (“polling remote task”, “iteration 4/10”).

string | null

**summary**

Human-readable outcome.

string | null

**updated\_at**

required

string format: date-time

**wake\_policy**

When outbound task activity wakes the owning session’s agent.

string

Allowed values: silent on\_terminal on\_activity

**worker\_id**

string | null

##### Example

```json
[
  {
    "progress": {
      "steps": [
        {
          "status": "pending"
        }
      ]
    },
    "state": "queued",
    "wake_policy": "silent"
  }
]
```

### 404

Session not found