---
title: "judgment sessions"
description: "Search and inspect sessions in a project."
sidebar:
  label: "Sessions"
seo:
  title: "judgment sessions CLI Reference | Judgment Docs"
  description: "Command reference for `judgment sessions`, used to search and inspect agent sessions in Judgment CLI workflows."
---

> **Warning**
>
> **The Judgment CLI is deprecated and no longer under active development.**
> This reference is retained for existing users. See the [CLI deprecation
> notice](/documentation/cli) for supported alternatives.


Search and inspect sessions in a project.

## Commands

| Command | Description |
| ------- | ----------- |
| [`sessions get`](#sessions-get) | Get session detail. |
| [`sessions search`](#sessions-search) | Search sessions. |
| [`sessions trace-behaviors`](#sessions-trace-behaviors) | List behaviors observed across a session’s traces. |
| [`sessions trace-ids`](#sessions-trace-ids) | List trace IDs in a session. |

### `sessions get`

Get session detail.

```bash
judgment sessions get [OPTIONS] [[[ORG_ID] PROJECT_ID] SESSION_ID...]
```

**Arguments**

| Name | Required |
| ---- | -------- |
| `[[ORG_ID] PROJECT_ID] SESSION_ID` | no |

**Options**

| Flag | Type | Required | Description |
| ---- | ---- | -------- | ----------- |
| <code style={{whiteSpace:"nowrap"}}>--organization-id</code>, <code style={{whiteSpace:"nowrap"}}>--org-id</code> | text | no | Organization ID. Defaults to JUDGMENT_ORG_ID or saved context. |
| <code style={{whiteSpace:"nowrap"}}>--organization</code>, <code style={{whiteSpace:"nowrap"}}>--org</code> | text | no | Organization name to resolve. |
| <code style={{whiteSpace:"nowrap"}}>--project-id</code> | text | no | Project ID. Defaults to JUDGMENT_PROJECT_ID or saved context. |
| <code style={{whiteSpace:"nowrap"}}>--project</code> | text | no | Project name to resolve. |
| <code style={{whiteSpace:"nowrap"}}>-o</code>, <code style={{whiteSpace:"nowrap"}}>--output</code> | `yaml`, `json` | no | Output format. |


### `sessions search`

Search sessions.

Filter, sort, time-bound, and paginate sessions in a project.

```bash
judgment sessions search [OPTIONS] [[[ORG_ID] PROJECT_ID]...]
```

**Arguments**

| Name | Required |
| ---- | -------- |
| `[[ORG_ID] PROJECT_ID]` | no |

**Options**

| Flag | Type | Required | Description |
| ---- | ---- | -------- | ----------- |
| <code style={{whiteSpace:"nowrap"}}>--organization-id</code>, <code style={{whiteSpace:"nowrap"}}>--org-id</code> | text | no | Organization ID. Defaults to JUDGMENT_ORG_ID or saved context. |
| <code style={{whiteSpace:"nowrap"}}>--organization</code>, <code style={{whiteSpace:"nowrap"}}>--org</code> | text | no | Organization name to resolve. |
| <code style={{whiteSpace:"nowrap"}}>--project-id</code> | text | no | Project ID. Defaults to JUDGMENT_PROJECT_ID or saved context. |
| <code style={{whiteSpace:"nowrap"}}>--project</code> | text | no | Project name to resolve. |
| <code style={{whiteSpace:"nowrap"}}>--filters</code> | text | yes | Filter expressions, ANDed together. Each item is `{"field":&lt;field&gt;,"op":&lt;op&gt;,"value":&lt;value&gt;}`. Allowed ops depend on the field's type.  **Op groups:** - `STRING_OPS` = `=` \| `!=` \| `contains` \| `does_not_contain` - `NUMERIC_OPS` = `=` \| `!=` \| `&lt;` \| `&lt;=` \| `&gt;` \| `&gt;=` - `ARRAY_ANY` = `any` (matches when the row's array overlaps the supplied values)  **String fields** (op in STRING_OPS, value is a string): `session_id`.  **Numeric fields** (op in NUMERIC_OPS, value is a number): `trace_count`, `latency` (nanoseconds), `total_cost` (USD).  **Array fields** (op = `any`, value is an array): `behaviors` (behavior UUIDs). |
| <code style={{whiteSpace:"nowrap"}}>--time-range</code> | text | no | `{"start_time":&lt;iso8601-string&gt;\|null,"end_time":&lt;iso8601-string&gt;\|null}`. Either bound may be null to leave that side open. Invalid timestamps return 400. |
| <code style={{whiteSpace:"nowrap"}}>--pagination</code> | text | yes | `{"limit":&lt;int 1-200&gt;,"cursorSortValue":&lt;string&gt;\|null,"cursorItemId":&lt;string&gt;\|null}`.  First page: pass null for both cursor fields. Each response returns `nextCursor:{sort_value,session_id}` (or null when `hasMore=false`); copy those into `cursorSortValue` and `cursorItemId` for the next page. |
| <code style={{whiteSpace:"nowrap"}}>--sort-by</code> | text | no | `{"field":&lt;sort_field&gt;,"direction":"asc"\|"desc"}` where `sort_field` is one of: `created_at`, `num_traces`, `latency`, `llm_cost`. Default when omitted: `{"field":"created_at","direction":"desc"}`. |
| <code style={{whiteSpace:"nowrap"}}>-o</code>, <code style={{whiteSpace:"nowrap"}}>--output</code> | `table`, `yaml`, `json` | no | Output format. |


### `sessions trace-behaviors`

List behaviors observed across a session’s traces.

```bash
judgment sessions trace-behaviors [OPTIONS] [[[ORG_ID] PROJECT_ID] SESSION_ID...]
```

**Arguments**

| Name | Required |
| ---- | -------- |
| `[[ORG_ID] PROJECT_ID] SESSION_ID` | no |

**Options**

| Flag | Type | Required | Description |
| ---- | ---- | -------- | ----------- |
| <code style={{whiteSpace:"nowrap"}}>--organization-id</code>, <code style={{whiteSpace:"nowrap"}}>--org-id</code> | text | no | Organization ID. Defaults to JUDGMENT_ORG_ID or saved context. |
| <code style={{whiteSpace:"nowrap"}}>--organization</code>, <code style={{whiteSpace:"nowrap"}}>--org</code> | text | no | Organization name to resolve. |
| <code style={{whiteSpace:"nowrap"}}>--project-id</code> | text | no | Project ID. Defaults to JUDGMENT_PROJECT_ID or saved context. |
| <code style={{whiteSpace:"nowrap"}}>--project</code> | text | no | Project name to resolve. |
| <code style={{whiteSpace:"nowrap"}}>-o</code>, <code style={{whiteSpace:"nowrap"}}>--output</code> | `yaml`, `json` | no | Output format. |


### `sessions trace-ids`

List trace IDs in a session.

```bash
judgment sessions trace-ids [OPTIONS] [[[ORG_ID] PROJECT_ID] SESSION_ID...]
```

**Arguments**

| Name | Required |
| ---- | -------- |
| `[[ORG_ID] PROJECT_ID] SESSION_ID` | no |

**Options**

| Flag | Type | Required | Description |
| ---- | ---- | -------- | ----------- |
| <code style={{whiteSpace:"nowrap"}}>--organization-id</code>, <code style={{whiteSpace:"nowrap"}}>--org-id</code> | text | no | Organization ID. Defaults to JUDGMENT_ORG_ID or saved context. |
| <code style={{whiteSpace:"nowrap"}}>--organization</code>, <code style={{whiteSpace:"nowrap"}}>--org</code> | text | no | Organization name to resolve. |
| <code style={{whiteSpace:"nowrap"}}>--project-id</code> | text | no | Project ID. Defaults to JUDGMENT_PROJECT_ID or saved context. |
| <code style={{whiteSpace:"nowrap"}}>--project</code> | text | no | Project name to resolve. |
| <code style={{whiteSpace:"nowrap"}}>-o</code>, <code style={{whiteSpace:"nowrap"}}>--output</code> | `yaml`, `json` | no | Output format. |
