## GET /v1/sessions

List sessions with filters for time, source, service, agent, user, repository, status, label, annotation, and event.

Required permissions: read:sessions.
API key: Supported.
CLI user token: Supported.
Session token: Requires the ellipsis:api scope, and the session's permissions.ellipsis rules must allow the operation.
Higher permission levels include lower levels: read < write < delete.
Grant match patterns can further restrict access to individual resources.

### Response

```text
{
  "has_more": bool,
  "message_counts": {
    "[str]": int
  },
  "next_cursor": str,
  "sessions": [
    {
      "agent": { # null | StandardAgentDocument | SlackAgentDocument |
      # GithubAgentDocument | LinearAgentDocument | SentryAgentDocument
        "config": {
          "ellipsis": {
            "description": str,
            "enabled": bool,
            "kind": "agent",
            "metadata": {
              "annotations": {
                "[str]": str
              },
              "labels": [
                str
              ]
            },
            "name": str,
            "version": str
          },
          "input": {
            "json_schema": {
              "[str]": any
            }
          },
          "session": {
            "budget": {
              "day": float,
              "month": float,
              "session": float,
              "week": float
            },
            "claude_code": {
              "effort": str,
              "fallback_model": str,
              "max_turns": int,
              "model": str,
              "prompt": { # str | null
                "builtin": "find_bugs"
              },
              "settings": {
                "path": str,
                "repository": {
                  "name": str,
                  "owner": str,
                  "ref": str
                }
              }
            },
            "codex": {
              "effort": str,
              "model": str,
              "prompt": { # str | null
                "builtin": "find_bugs"
              }
            },
            "conversation": {
              "interactive": bool
            },
            "environment": { # str
              "compute": {
                "cpu": int,
                "idle": str,
                "memory": { # str | null
                  "gb": int,
                  "mb": int
                },
                "timeout": str
              },
              "hooks": {
                "after_checkout": { # str | null
                  "run": str
                },
                "before_start": { # str | null
                  "run": str
                },
                "build_base": { # str | null
                  "inputs": [
                    str
                  ],
                  "run": str
                },
                "post_clone": str,
                "post_start": str,
                "validate": { # str | null
                  "run": str
                }
              },
              "mcp": [ # list[str | McpServerRef | McpRemoteServer |
              # McpCommandServer]
                {
                  "args": [
                    str
                  ],
                  "command": str,
                  "env": {
                    "[str]": str
                  },
                  "name": str
                }
              ],
              "repositories": [
                {
                  "name": str,
                  "owner": str,
                  "ref": str
                }
              ],
              "variables": [
                {
                  "name": str,
                  "value": str
                }
              ]
            },
            "gemini": {
              "model": str,
              "prompt": { # str | null
                "builtin": "find_bugs"
              }
            },
            "mcp": [ # list[str | McpServerRef | McpRemoteServer |
            # McpCommandServer]
              {
                "args": [
                  str
                ],
                "command": str,
                "env": {
                  "[str]": str
                },
                "name": str
              }
            ],
            "metadata": {
              "annotations": {
                "[str]": str
              },
              "labels": [
                str
              ]
            },
            "output": {
              "json_schema": {
                "[str]": any
              }
            },
            "permissions": {
              "ellipsis": [ # str | null | list[str | EllipsisGrant]
                {
                  "allow": [ # str
                    str
                  ]
                }
              ],
              "github": [ # str | null | list[str | GithubGrant]
                {
                  "allow": [ # str
                    str
                  ],
                  "base": str,
                  "branch": str,
                  "issue": [ # int | null
                    int
                  ],
                  "limit": int,
                  "pull_request": [ # int | null
                    int
                  ],
                  "repository": [ # str | null
                    str
                  ]
                }
              ]
            },
            "skills": [
              {
                "path": str,
                "repository": {
                  "name": str,
                  "owner": str,
                  "ref": str
                }
              }
            ]
          },
          "trigger": { # null | ReactTrigger | CronTrigger
            "check_run": {
              "branch": [
                str
              ],
              "for": {
                "bots": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                },
                "teams": [
                  str
                ],
                "users": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                }
              },
              "names": [
                str
              ],
              "on": [
                str
              ],
              "repositories": { # list[str]
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              }
            },
            "check_suite": {
              "apps": [
                str
              ],
              "branch": [
                str
              ],
              "for": {
                "bots": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                },
                "teams": [
                  str
                ],
                "users": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                }
              },
              "on": [
                str
              ],
              "repositories": { # list[str]
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              }
            },
            "enabled": bool,
            "issue": {
              "for": {
                "bots": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                },
                "teams": [
                  str
                ],
                "users": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                }
              },
              "labels": [
                str
              ],
              "on": [
                str
              ],
              "repositories": { # list[str]
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              }
            },
            "linear_issue": {
              "assignee": { # null | list[str] | str
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              },
              "changed": {
                "assignee": {
                  "from": { # null | list[str] | str
                    "exclude": [
                      str
                    ],
                    "include": [
                      str
                    ]
                  },
                  "to": { # null | list[str] | str
                    "exclude": [
                      str
                    ],
                    "include": [
                      str
                    ]
                  }
                },
                "labels": {
                  "added": { # null | list[str] | str
                    "exclude": [
                      str
                    ],
                    "include": [
                      str
                    ]
                  },
                  "removed": { # null | list[str] | str
                    "exclude": [
                      str
                    ],
                    "include": [
                      str
                    ]
                  }
                },
                "priority": {
                  "from": { # null | list[str] | str
                    "exclude": [
                      str
                    ],
                    "include": [
                      str
                    ]
                  },
                  "to": { # null | list[str] | str
                    "exclude": [
                      str
                    ],
                    "include": [
                      str
                    ]
                  }
                },
                "project": {
                  "from": { # null | list[str] | str
                    "exclude": [
                      str
                    ],
                    "include": [
                      str
                    ]
                  },
                  "to": { # null | list[str] | str
                    "exclude": [
                      str
                    ],
                    "include": [
                      str
                    ]
                  }
                },
                "state": {
                  "from": { # null | list[str] | str
                    "exclude": [
                      str
                    ],
                    "include": [
                      str
                    ]
                  },
                  "to": { # null | list[str] | str
                    "exclude": [
                      str
                    ],
                    "include": [
                      str
                    ]
                  }
                }
              },
              "for": {
                "bots": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                },
                "teams": [
                  str
                ],
                "users": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                }
              },
              "labels": { # null | list[str] | str
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              },
              "on": [
                str
              ],
              "priority": { # null | list[str] | str
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              },
              "project": { # null | list[str] | str
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              },
              "state": { # null | list[str] | str
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              },
              "team": { # null | list[str] | str
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              }
            },
            "pull_request": {
              "base": [
                str
              ],
              "draft": bool,
              "for": {
                "bots": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                },
                "teams": [
                  str
                ],
                "users": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                }
              },
              "head": [
                str
              ],
              "labels": [
                str
              ],
              "on": [
                str
              ],
              "paths": [
                str
              ],
              "repositories": { # list[str]
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              }
            },
            "push": {
              "branch": [
                str
              ],
              "for": {
                "bots": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                },
                "teams": [
                  str
                ],
                "users": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                }
              },
              "paths": [
                str
              ],
              "repositories": { # list[str]
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              }
            },
            "release": {
              "for": {
                "bots": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                },
                "teams": [
                  str
                ],
                "users": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                }
              },
              "on": [
                str
              ],
              "prerelease": bool,
              "repositories": { # list[str]
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              },
              "tag": [
                str
              ]
            },
            "sentry": {
              "on": [
                str
              ],
              "projects": [
                str
              ]
            },
            "slack_channel": {},
            "status": {
              "branch": [
                str
              ],
              "for": {
                "bots": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                },
                "teams": [
                  str
                ],
                "users": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                }
              },
              "names": [
                str
              ],
              "on": [
                str
              ],
              "repositories": { # list[str]
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              }
            },
            "type": "react",
            "workflow_run": {
              "branch": [
                str
              ],
              "for": {
                "bots": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                },
                "teams": [
                  str
                ],
                "users": { # bool | list[str]
                  "exclude": [
                    str
                  ],
                  "include": [ # bool
                    str
                  ]
                }
              },
              "names": [
                str
              ],
              "on": [
                str
              ],
              "repositories": { # list[str]
                "exclude": [
                  str
                ],
                "include": [
                  str
                ]
              }
            }
          }
        },
        "id": str,
        "kind": "agent",
        "name": str,
        "sha": str
      },
      "archived": {
        "at": str,
        "by": {
          "avatar_url": str,
          "id": str,
          "name": str
        },
        "deletes_at": str
      },
      "budget": {
        "limit": int,
        "source": str
      },
      "claude_code": {
        "effort": str,
        "fallback_model": str,
        "max_turns": int,
        "model": str,
        "prompt": { # str | null
          "builtin": "find_bugs"
        },
        "settings": {
          "path": str,
          "repository": {
            "name": str,
            "owner": str,
            "ref": str
          }
        }
      },
      "codex": {
        "effort": str,
        "model": str,
        "prompt": { # str | null
          "builtin": "find_bugs"
        }
      },
      "content_deleted_at": str,
      "conversation": {
        "interactive": bool,
        "prompting": {
          "blocked_reason": str,
          "detail": str,
          "enabled": bool,
          "surface_name": str
        },
        "warm": bool
      },
      "cost": {
        "charged": int,
        "cpu": int,
        "fee": int,
        "llm": {
          "all": {
            "claude_subscription": int,
            "codex_subscription": int,
            "platform": int,
            "total": int
          },
          "by_model": [
            {
              "claude_subscription": int,
              "codex_subscription": int,
              "model": str,
              "platform": int,
              "total": int
            }
          ]
        },
        "memory": int,
        "total": int
      },
      "created_at": str,
      "environment": {
        "compute": {
          "cpu": int,
          "idle": str,
          "memory": { # str | null
            "gb": int,
            "mb": int
          },
          "timeout": str
        },
        "hooks": {
          "after_checkout": { # str | null
            "run": str
          },
          "before_start": { # str | null
            "run": str
          },
          "build_base": { # str | null
            "inputs": [
              str
            ],
            "run": str
          },
          "post_clone": str,
          "post_start": str,
          "validate": { # str | null
            "run": str
          }
        },
        "id": str,
        "mcp": [ # list[str | McpServerRef | McpRemoteServer | McpCommandServer]
          {
            "args": [
              str
            ],
            "command": str,
            "env": {
              "[str]": str
            },
            "name": str
          }
        ],
        "repositories": [
          {
            "name": str,
            "owner": str,
            "ref": str
          }
        ],
        "source": str,
        "variables": [
          {
            "name": str,
            "value": str
          }
        ]
      },
      "error": {
        "detail": str,
        "reason": str
      },
      "event": {
        "body": {
          "[str]": any
        },
        "headers": {
          "[str]": str
        },
        "integration": str
      },
      "gemini": {
        "model": str,
        "prompt": { # str | null
          "builtin": "find_bugs"
        }
      },
      "id": str,
      "mcp": [ # list[str | McpServerRef | McpRemoteServer | McpCommandServer]
        {
          "args": [
            str
          ],
          "command": str,
          "env": {
            "[str]": str
          },
          "name": str
        }
      ],
      "metadata": {
        "annotations": {
          "[str]": str
        },
        "labels": [
          str
        ]
      },
      "output": {
        "json_schema": {
          "[str]": any
        },
        "result": {
          "[str]": any
        }
      },
      "parent": {
        "id": str
      },
      "permissions": {
        "ellipsis": [ # str | null | list[str | EllipsisGrant]
          {
            "allow": [ # str
              str
            ]
          }
        ],
        "github": [ # str | null | list[str | GithubGrant]
          {
            "allow": [ # str
              str
            ],
            "base": str,
            "branch": str,
            "issue": [ # int | null
              int
            ],
            "limit": int,
            "pull_request": [ # int | null
              int
            ],
            "repository": [ # str | null
              str
            ]
          }
        ]
      },
      "review": {
        "id": str
      },
      "scm": {
        "github": {
          "repos": [
            {
              "commits": [
                {
                  "committed_at": str,
                  "pushed": bool,
                  "sha": str,
                  "subject": str
                }
              ],
              "commits_total": int,
              "full_name": str,
              "local_commit": str,
              "local_uncommitted_files": [
                {
                  "additions": int,
                  "deletions": int,
                  "patch": str,
                  "path": str,
                  "status": str
                }
              ],
              "prs": [
                {
                  "gh_pr_id": int,
                  "number": int,
                  "pull_request": {
                    "additions": int,
                    "author": {
                      "avatar_url": str,
                      "id": int,
                      "login": str,
                      "name": str,
                      "type": str
                    },
                    "base": {
                      "ref": str,
                      "sha": str
                    },
                    "changed_files": int,
                    "commits": int,
                    "created_at": str,
                    "deletions": int,
                    "head": {
                      "ref": str,
                      "sha": str
                    },
                    "id": int,
                    "merged_at": str,
                    "number": int,
                    "repository": {
                      "id": int,
                      "name": str,
                      "owner": str
                    },
                    "status": str,
                    "title": str,
                    "updated_at": str,
                    "url": str
                  },
                  "title": str,
                  "url": str
                }
              ],
              "remote_branch": str,
              "remote_commit": str
            }
          ]
        }
      },
      "skills": [
        {
          "path": str,
          "repository": {
            "name": str,
            "owner": str,
            "ref": str
          }
        }
      ],
      "source": str,
      "status": str,
      "summary": {
        "created_at": str,
        "description": str,
        "source": str
      },
      "tokens": {
        "all": {
          "cache_creation": int,
          "cache_read": int,
          "input": int,
          "output": int,
          "total": int
        },
        "by_model": [
          {
            "cache_creation": int,
            "cache_read": int,
            "input": int,
            "model": str,
            "output": int,
            "total": int
          }
        ]
      },
      "updated_at": str,
      "url": str,
      "user": {
        "avatar_url": str,
        "id": str,
        "name": str
      },
      "wait_ms": int
    }
  ]
}
```

### Python

```python
import os

from ellipsis import Ellipsis

client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])

for item in client.sessions.list():
    print(item)
```

### TypeScript

```typescript
import { Ellipsis } from '@ellipsis-dev/sdk';

const client = new Ellipsis({
  apiKey: process.env.ELLIPSIS_API_TOKEN!,
});

for await (const item of await client.sessions.list()) {
  console.log(item);
}
```

### cURL

```bash
curl "https://api.ellipsis.dev/v1/sessions" \
  -H "Authorization: Bearer $ELLIPSIS_API_TOKEN"
```

### Response schema

```json
{
  "properties": {
    "has_more": {
      "default": false,
      "type": "boolean"
    },
    "message_counts": {
      "items": {
        "type": "integer"
      },
      "type": "object"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "sessions": {
      "items": {
        "additionalProperties": false,
        "allOf": [
          {
            "oneOf": [
              {
                "properties": {
                  "claude_code": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "codex": {
                    "type": "null"
                  },
                  "gemini": {
                    "type": "null"
                  }
                },
                "required": [
                  "claude_code",
                  "codex",
                  "gemini"
                ]
              },
              {
                "properties": {
                  "claude_code": {
                    "type": "null"
                  },
                  "codex": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "gemini": {
                    "type": "null"
                  }
                },
                "required": [
                  "claude_code",
                  "codex",
                  "gemini"
                ]
              },
              {
                "properties": {
                  "claude_code": {
                    "type": "null"
                  },
                  "codex": {
                    "type": "null"
                  },
                  "gemini": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "claude_code",
                  "codex",
                  "gemini"
                ]
              }
            ]
          }
        ],
        "properties": {
          "agent": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "properties": {
                      "config": {
                        "type": "object"
                      },
                      "id": {
                        "type": "object"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "name": {
                        "type": "object"
                      },
                      "sha": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "config",
                      "id",
                      "kind",
                      "name",
                      "sha"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "config": {
                        "type": "object"
                      },
                      "id": {
                        "type": "object"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "name": {
                        "type": "object"
                      },
                      "sha": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "config",
                      "id",
                      "kind",
                      "name",
                      "sha"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "config": {
                        "type": "object"
                      },
                      "id": {
                        "type": "object"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "name": {
                        "type": "object"
                      },
                      "sha": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "config",
                      "id",
                      "kind",
                      "name",
                      "sha"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "config": {
                        "type": "object"
                      },
                      "id": {
                        "type": "object"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "name": {
                        "type": "object"
                      },
                      "sha": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "config",
                      "id",
                      "kind",
                      "name",
                      "sha"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "config": {
                        "type": "object"
                      },
                      "id": {
                        "type": "object"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "name": {
                        "type": "object"
                      },
                      "sha": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "config",
                      "id",
                      "kind",
                      "name",
                      "sha"
                    ],
                    "type": "object"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "archived": {
            "anyOf": [
              {
                "properties": {
                  "at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "by": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "deletes_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "at",
                  "by",
                  "deletes_at"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget": {
            "properties": {
              "limit": {
                "default": 0,
                "type": "integer"
              },
              "source": {
                "enum": [
                  "system",
                  "account",
                  "config",
                  "run"
                ],
                "type": "string"
              }
            },
            "required": [
              "limit",
              "source"
            ],
            "type": "object"
          },
          "claude_code": {
            "anyOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "effort": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fallback_model": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "max_turns": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "model": {
                    "type": "string"
                  },
                  "prompt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "settings": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "effort",
                  "fallback_model",
                  "max_turns",
                  "model",
                  "prompt",
                  "settings"
                ],
                "type": "object",
                "x-ellipsis-returned-form-of": "ClaudeCodeConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "codex": {
            "anyOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "effort": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "model": {
                    "type": "string"
                  },
                  "prompt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "effort",
                  "model",
                  "prompt"
                ],
                "type": "object",
                "x-ellipsis-returned-form-of": "CodexConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_deleted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversation": {
            "properties": {
              "interactive": {
                "type": "boolean"
              },
              "prompting": {
                "properties": {
                  "blocked_reason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "detail": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "surface_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "blocked_reason",
                  "detail",
                  "enabled",
                  "surface_name"
                ],
                "type": "object"
              },
              "warm": {
                "type": "boolean"
              }
            },
            "required": [
              "interactive",
              "prompting",
              "warm"
            ],
            "type": "object"
          },
          "cost": {
            "properties": {
              "charged": {
                "default": 0,
                "type": "integer"
              },
              "cpu": {
                "default": 0,
                "type": "integer"
              },
              "fee": {
                "default": 0,
                "type": "integer"
              },
              "llm": {
                "properties": {
                  "all": {
                    "properties": {
                      "claude_subscription": {
                        "type": "integer"
                      },
                      "codex_subscription": {
                        "type": "integer"
                      },
                      "platform": {
                        "type": "integer"
                      },
                      "total": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "claude_subscription",
                      "codex_subscription",
                      "platform",
                      "total"
                    ],
                    "type": "object"
                  },
                  "by_model": {
                    "items": {
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "all",
                  "by_model"
                ],
                "type": "object"
              },
              "memory": {
                "default": 0,
                "type": "integer"
              },
              "total": {
                "default": 0,
                "type": "integer"
              }
            },
            "required": [
              "charged",
              "cpu",
              "fee",
              "llm",
              "memory",
              "total"
            ],
            "type": "object"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "environment": {
            "additionalProperties": false,
            "properties": {
              "compute": {
                "additionalProperties": false,
                "properties": {
                  "cpu": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "idle": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "memory": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "timeout": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "cpu",
                  "idle",
                  "memory",
                  "timeout"
                ],
                "type": "object",
                "x-ellipsis-returned-form-of": "ComputeConfig"
              },
              "hooks": {
                "additionalProperties": false,
                "properties": {
                  "after_checkout": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "before_start": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "build_base": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "post_clone": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "post_start": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "validate": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "after_checkout",
                  "before_start",
                  "build_base",
                  "post_clone",
                  "post_start",
                  "validate"
                ],
                "type": "object",
                "x-ellipsis-returned-form-of": "EnvironmentHooks"
              },
              "id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "mcp": {
                "default": [],
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object"
                    },
                    {
                      "type": "object"
                    },
                    {
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "repositories": {
                "default": [],
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "owner": {
                      "type": "object"
                    },
                    "ref": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "name",
                    "owner",
                    "ref"
                  ],
                  "type": "object",
                  "x-ellipsis-returned-form-of": "RepositoryRef"
                },
                "type": "array"
              },
              "source": {
                "anyOf": [
                  {
                    "enum": [
                      "request",
                      "agent",
                      "repo_default",
                      "account_default",
                      "platform_default"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "variables": {
                "default": [],
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "name",
                    "value"
                  ],
                  "type": "object",
                  "x-ellipsis-returned-form-of": "EnvironmentVariable"
                },
                "type": "array"
              }
            },
            "required": [
              "compute",
              "hooks",
              "id",
              "mcp",
              "repositories",
              "source",
              "variables"
            ],
            "type": "object"
          },
          "error": {
            "anyOf": [
              {
                "properties": {
                  "detail": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason": {
                    "enum": [
                      "error",
                      "tool_call_failed",
                      "budget_hit",
                      "payment_required",
                      "blocked",
                      "contact_email_required",
                      "lifecycle_hook_failed",
                      "missing_repo_access",
                      "missing_token_permissions",
                      "missing_environment_variables",
                      "missing_github_integration",
                      "agent_unavailable",
                      "upstream_unavailable",
                      "unsupported_configuration",
                      "execution_disabled",
                      "interrupted",
                      "stopped",
                      "timeout"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "detail",
                  "reason"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "event": {
            "anyOf": [
              {
                "properties": {
                  "body": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "headers": {
                    "items": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "integration": {
                    "enum": [
                      "github",
                      "linear",
                      "slack",
                      "sentry"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "body",
                  "headers",
                  "integration"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "gemini": {
            "anyOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "prompt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "model",
                  "prompt"
                ],
                "type": "object",
                "x-ellipsis-returned-form-of": "GeminiConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "mcp": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "headers": {
                      "type": "object"
                    },
                    "name": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "headers",
                    "name",
                    "url"
                  ],
                  "type": "object",
                  "x-ellipsis-returned-form-of": "McpRemoteServer"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "args": {
                      "type": "array"
                    },
                    "command": {
                      "type": "string"
                    },
                    "env": {
                      "type": "object"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "args",
                    "command",
                    "env",
                    "name"
                  ],
                  "type": "object",
                  "x-ellipsis-returned-form-of": "McpCommandServer"
                }
              ]
            },
            "type": "array"
          },
          "metadata": {
            "additionalProperties": false,
            "properties": {
              "annotations": {
                "items": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "labels": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "annotations",
              "labels"
            ],
            "type": "object",
            "x-ellipsis-returned-form-of": "ConfigMetadata"
          },
          "output": {
            "anyOf": [
              {
                "properties": {
                  "json_schema": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "result": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "json_schema",
                  "result"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent": {
            "anyOf": [
              {
                "properties": {
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "permissions": {
            "additionalProperties": false,
            "properties": {
              "ellipsis": {
                "anyOf": [
                  {
                    "enum": [
                      "all",
                      "read_only"
                    ],
                    "type": "string"
                  },
                  {
                    "items": {
                      "type": "object"
                    },
                    "type": "array"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "github": {
                "anyOf": [
                  {
                    "enum": [
                      "all",
                      "read_only"
                    ],
                    "type": "string"
                  },
                  {
                    "items": {
                      "type": "object"
                    },
                    "type": "array"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "ellipsis",
              "github"
            ],
            "type": "object",
            "x-ellipsis-returned-form-of": "PermissionsConfig"
          },
          "review": {
            "anyOf": [
              {
                "properties": {
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "scm": {
            "properties": {
              "github": {
                "anyOf": [
                  {
                    "properties": {
                      "repos": {
                        "type": "array"
                      }
                    },
                    "required": [
                      "repos"
                    ],
                    "type": "object"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "github"
            ],
            "type": "object"
          },
          "skills": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "path": {
                  "type": "string"
                },
                "repository": {
                  "anyOf": [
                    {
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "path",
                "repository"
              ],
              "type": "object",
              "x-ellipsis-returned-form-of": "SkillRef"
            },
            "type": "array"
          },
          "source": {
            "enum": [
              "react",
              "code_review",
              "web",
              "api",
              "cli",
              "mention",
              "cron"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "preparing",
              "running",
              "idle",
              "closed"
            ],
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "properties": {
                  "created_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "type": "string"
                  },
                  "source": {
                    "enum": [
                      "prompt",
                      "generated",
                      "user"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "created_at",
                  "description",
                  "source"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokens": {
            "properties": {
              "all": {
                "properties": {
                  "cache_creation": {
                    "default": 0,
                    "type": "integer"
                  },
                  "cache_read": {
                    "default": 0,
                    "type": "integer"
                  },
                  "input": {
                    "default": 0,
                    "type": "integer"
                  },
                  "output": {
                    "default": 0,
                    "type": "integer"
                  },
                  "total": {
                    "default": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "cache_creation",
                  "cache_read",
                  "input",
                  "output",
                  "total"
                ],
                "type": "object"
              },
              "by_model": {
                "items": {
                  "properties": {
                    "cache_creation": {
                      "type": "integer"
                    },
                    "cache_read": {
                      "type": "integer"
                    },
                    "input": {
                      "type": "integer"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "cache_creation",
                    "cache_read",
                    "input",
                    "model",
                    "output",
                    "total"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "all",
              "by_model"
            ],
            "type": "object"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "user": {
            "anyOf": [
              {
                "properties": {
                  "avatar_url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "avatar_url",
                  "id",
                  "name"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "wait_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "agent",
          "archived",
          "budget",
          "claude_code",
          "codex",
          "content_deleted_at",
          "conversation",
          "cost",
          "created_at",
          "environment",
          "error",
          "event",
          "gemini",
          "id",
          "mcp",
          "metadata",
          "output",
          "parent",
          "permissions",
          "review",
          "scm",
          "skills",
          "source",
          "status",
          "summary",
          "tokens",
          "updated_at",
          "url",
          "user",
          "wait_ms"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "sessions"
  ],
  "type": "object"
}
```
