## POST /v1/sessions

Start a cloud session. Select a harness explicitly. Provide an inline environment, reference a saved environment, or omit it to use the default environment. Set conversation.interactive to false to run once. The response carries the session. Its status says where it is.

Required permissions: write: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.

### Request

```text
{
  "budget": {
    "session": 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 | null
    "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
      }
    ]
  },
  "force_rebuild": bool,
  "gemini": {
    "model": str,
    "prompt": { # str | null
      "builtin": "find_bugs"
    }
  },
  "idempotency_key": str,
  "images": [
    {
      "data": str,
      "media_type": str
    }
  ],
  "mcp": [ # null | 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
      }
    }
  ]
}
```

### Response

```text
{
  "session": {
    "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 (
    ClaudeCodeConfig,
    Ellipsis,
    RunBudget,
    SessionConversationConfig,
)

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

result = client.sessions.start(
    budget=RunBudget(session=3),
    claude_code=ClaudeCodeConfig(
        model="claude-opus-5-5",
        prompt="Run the tests and report failures.",
    ),
    conversation=SessionConversationConfig(interactive=False),
    environment="api-environment",
)
print(result)
```

### TypeScript

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

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

const request: Parameters<typeof client.sessions.start>[0] = {
  claude_code: {
    model: 'claude-opus-5-5',
    prompt: 'Run the tests and report failures.',
  },
  environment: 'api-environment',
  conversation: { interactive: false },
  budget: { session: 3 },
};

const result = await client.sessions.start(request);
console.log(result);
```

### cURL

```bash
curl -X POST "https://api.ellipsis.dev/v1/sessions" \
  -H "Authorization: Bearer $ELLIPSIS_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "claude_code": {
    "model": "claude-opus-5-5",
    "prompt": "Run the tests and report failures."
  },
  "environment": "api-environment",
  "conversation": {
    "interactive": false
  },
  "budget": {
    "session": 3
  }
}'
```

### Request schema

```json
{
  "additionalProperties": false,
  "allOf": [
    {
      "oneOf": [
        {
          "properties": {
            "claude_code": {
              "additionalProperties": true,
              "type": "object"
            },
            "codex": {
              "type": "null"
            },
            "gemini": {
              "type": "null"
            }
          },
          "required": [
            "claude_code"
          ]
        },
        {
          "properties": {
            "claude_code": {
              "type": "null"
            },
            "codex": {
              "additionalProperties": true,
              "type": "object"
            },
            "gemini": {
              "type": "null"
            }
          },
          "required": [
            "codex"
          ]
        },
        {
          "properties": {
            "claude_code": {
              "type": "null"
            },
            "codex": {
              "type": "null"
            },
            "gemini": {
              "additionalProperties": true,
              "type": "object"
            }
          },
          "required": [
            "gemini"
          ]
        }
      ]
    }
  ],
  "properties": {
    "budget": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "session": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "claude_code": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "effort": {
              "anyOf": [
                {
                  "enum": [
                    "low",
                    "medium",
                    "high",
                    "xhigh",
                    "max"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "fallback_model": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "max_turns": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "model": {
              "type": "string"
            },
            "prompt": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "builtin": {
                      "const": "find_bugs",
                      "type": "string"
                    }
                  },
                  "required": [
                    "builtin"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "settings": {
              "anyOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "path": {
                      "type": "string"
                    },
                    "repository": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "path"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "model"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "codex": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "effort": {
              "anyOf": [
                {
                  "enum": [
                    "none",
                    "low",
                    "medium",
                    "high",
                    "xhigh",
                    "max"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "model": {
              "type": "string"
            },
            "prompt": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "builtin": {
                      "const": "find_bugs",
                      "type": "string"
                    }
                  },
                  "required": [
                    "builtin"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "model"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "conversation": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "interactive": {
              "type": "boolean"
            }
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "environment": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "compute": {
              "additionalProperties": false,
              "properties": {
                "cpu": {
                  "anyOf": [
                    {
                      "maximum": 32,
                      "minimum": 2,
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "idle": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "memory": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "additionalProperties": false,
                      "properties": {
                        "gb": {
                          "type": "object"
                        },
                        "mb": {
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "timeout": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "type": "object"
            },
            "hooks": {
              "additionalProperties": false,
              "properties": {
                "after_checkout": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "run": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "run"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "before_start": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "run": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "run"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "build_base": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "inputs": {
                          "type": "object"
                        },
                        "run": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "run"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "post_clone": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "post_start": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "validate": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "run": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "run"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "type": "object"
            },
            "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": [
                      "name",
                      "url"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "args": {
                        "type": "array"
                      },
                      "command": {
                        "type": "string"
                      },
                      "env": {
                        "type": "object"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "command"
                    ],
                    "type": "object"
                  }
                ]
              },
              "type": "array"
            },
            "repositories": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "owner": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ref": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "variables": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "force_rebuild": {
      "type": "boolean"
    },
    "gemini": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "model": {
              "type": "string"
            },
            "prompt": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "builtin": {
                      "const": "find_bugs",
                      "type": "string"
                    }
                  },
                  "required": [
                    "builtin"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "model"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "idempotency_key": {
      "anyOf": [
        {
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "images": {
      "items": {
        "properties": {
          "data": {
            "type": "string"
          },
          "media_type": {
            "enum": [
              "image/png",
              "image/jpeg",
              "image/gif",
              "image/webp"
            ],
            "type": "string"
          }
        },
        "required": [
          "media_type",
          "data"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "mcp": {
      "anyOf": [
        {
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "headers": {
                    "items": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "args": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "command": {
                    "type": "string"
                  },
                  "env": {
                    "items": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "command"
                ],
                "type": "object"
              }
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ]
    },
    "metadata": {
      "additionalProperties": false,
      "properties": {
        "annotations": {
          "items": {
            "type": "string"
          },
          "type": "object"
        },
        "labels": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "output": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "json_schema": {
              "additionalProperties": true,
              "type": "object"
            }
          },
          "required": [
            "json_schema"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "permissions": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "ellipsis": {
              "anyOf": [
                {
                  "enum": [
                    "all",
                    "read_only"
                  ],
                  "type": "string"
                },
                {
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      }
                    ]
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ]
            },
            "github": {
              "anyOf": [
                {
                  "enum": [
                    "all",
                    "read_only"
                  ],
                  "type": "string"
                },
                {
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      }
                    ]
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "skills": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": false,
            "properties": {
              "path": {
                "type": "string"
              },
              "repository": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "owner": {
                        "type": "object"
                      },
                      "ref": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "path"
            ],
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object"
}
```

### Response schema

```json
{
  "properties": {
    "session": {
      "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": {
                      "additionalProperties": false,
                      "properties": {
                        "ellipsis": {
                          "type": "object"
                        },
                        "input": {
                          "type": "object"
                        },
                        "session": {
                          "type": "object"
                        },
                        "trigger": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "ellipsis",
                        "input",
                        "session",
                        "trigger"
                      ],
                      "type": "object",
                      "x-ellipsis-returned-form-of": "AgentConfig"
                    },
                    "id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "const": "agent",
                      "default": "agent",
                      "type": "string",
                      "x-ellipsis-enum": "AgentKind"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sha": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "config",
                    "id",
                    "kind",
                    "name",
                    "sha"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "config": {
                      "additionalProperties": false,
                      "properties": {
                        "ellipsis": {
                          "type": "object"
                        },
                        "session": {
                          "type": "object"
                        },
                        "slack": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "ellipsis",
                        "session",
                        "slack"
                      ],
                      "type": "object",
                      "x-ellipsis-returned-form-of": "SlackConfig"
                    },
                    "id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "const": "slack",
                      "default": "slack",
                      "type": "string",
                      "x-ellipsis-enum": "AgentKind"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sha": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "config",
                    "id",
                    "kind",
                    "name",
                    "sha"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "config": {
                      "additionalProperties": false,
                      "properties": {
                        "ellipsis": {
                          "type": "object"
                        },
                        "github": {
                          "type": "object"
                        },
                        "session": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "ellipsis",
                        "github",
                        "session"
                      ],
                      "type": "object",
                      "x-ellipsis-returned-form-of": "GithubConfig"
                    },
                    "id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "const": "github",
                      "default": "github",
                      "type": "string",
                      "x-ellipsis-enum": "AgentKind"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sha": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "config",
                    "id",
                    "kind",
                    "name",
                    "sha"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "config": {
                      "additionalProperties": false,
                      "properties": {
                        "ellipsis": {
                          "type": "object"
                        },
                        "linear": {
                          "type": "object"
                        },
                        "session": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "ellipsis",
                        "linear",
                        "session"
                      ],
                      "type": "object",
                      "x-ellipsis-returned-form-of": "LinearConfig"
                    },
                    "id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "const": "linear",
                      "default": "linear",
                      "type": "string",
                      "x-ellipsis-enum": "AgentKind"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sha": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "config",
                    "id",
                    "kind",
                    "name",
                    "sha"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "config": {
                      "additionalProperties": false,
                      "properties": {
                        "ellipsis": {
                          "type": "object"
                        },
                        "sentry": {
                          "type": "object"
                        },
                        "session": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "ellipsis",
                        "sentry",
                        "session"
                      ],
                      "type": "object",
                      "x-ellipsis-returned-form-of": "SentryConfig"
                    },
                    "id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "const": "sentry",
                      "default": "sentry",
                      "type": "string",
                      "x-ellipsis-enum": "AgentKind"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sha": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "config",
                    "id",
                    "kind",
                    "name",
                    "sha"
                  ],
                  "type": "object"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "archived": {
          "anyOf": [
            {
              "properties": {
                "at": {
                  "format": "date-time",
                  "type": "string"
                },
                "by": {
                  "anyOf": [
                    {
                      "properties": {
                        "avatar_url": {
                          "type": "object"
                        },
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "id",
                        "name"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "deletes_at": {
                  "anyOf": [
                    {
                      "format": "date-time",
                      "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": [
                    {
                      "enum": [
                        "low",
                        "medium",
                        "high",
                        "xhigh",
                        "max"
                      ],
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "fallback_model": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "max_turns": {
                  "anyOf": [
                    {
                      "exclusiveMinimum": 0,
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "model": {
                  "type": "string"
                },
                "prompt": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "additionalProperties": false,
                      "properties": {
                        "builtin": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "builtin"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "settings": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "path": {
                          "type": "string"
                        },
                        "repository": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "path",
                        "repository"
                      ],
                      "type": "object",
                      "x-ellipsis-returned-form-of": "SettingsRef"
                    },
                    {
                      "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": [
                    {
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "xhigh",
                        "max"
                      ],
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "model": {
                  "type": "string"
                },
                "prompt": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "additionalProperties": false,
                      "properties": {
                        "builtin": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "builtin"
                      ],
                      "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": [
                    {
                      "enum": [
                        "mention_surface",
                        "non_interactive",
                        "harness_single_turn",
                        "budget_exhausted",
                        "closed",
                        "archived"
                      ],
                      "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": {
                      "default": 0,
                      "type": "integer"
                    },
                    "codex_subscription": {
                      "default": 0,
                      "type": "integer"
                    },
                    "platform": {
                      "default": 0,
                      "type": "integer"
                    },
                    "total": {
                      "default": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "claude_subscription",
                    "codex_subscription",
                    "platform",
                    "total"
                  ],
                  "type": "object"
                },
                "by_model": {
                  "items": {
                    "properties": {
                      "claude_subscription": {
                        "type": "integer"
                      },
                      "codex_subscription": {
                        "type": "integer"
                      },
                      "model": {
                        "type": "string"
                      },
                      "platform": {
                        "type": "integer"
                      },
                      "total": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "claude_subscription",
                      "codex_subscription",
                      "model",
                      "platform",
                      "total"
                    ],
                    "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": [
                    {
                      "maximum": 32,
                      "minimum": 2,
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "idle": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "memory": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "additionalProperties": false,
                      "properties": {
                        "gb": {
                          "type": "object"
                        },
                        "mb": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "gb",
                        "mb"
                      ],
                      "type": "object",
                      "x-ellipsis-returned-form-of": "MemorySize"
                    },
                    {
                      "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": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "run": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "run"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "before_start": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "run": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "run"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "build_base": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "inputs": {
                          "type": "object"
                        },
                        "run": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "inputs",
                        "run"
                      ],
                      "type": "object",
                      "x-ellipsis-returned-form-of": "EnvironmentBaseBuild"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "post_clone": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "post_start": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "validate": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "run": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "run"
                      ],
                      "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"
                  },
                  {
                    "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"
            },
            "repositories": {
              "default": [],
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "owner": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ref": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "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": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "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"
                    },
                    {
                      "additionalProperties": false,
                      "properties": {
                        "builtin": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "builtin"
                      ],
                      "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": {
                    "items": {
                      "type": "string"
                    },
                    "default": {},
                    "type": "object"
                  },
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                },
                "required": [
                  "headers",
                  "name",
                  "url"
                ],
                "type": "object",
                "x-ellipsis-returned-form-of": "McpRemoteServer"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "args": {
                    "default": [],
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "command": {
                    "type": "string"
                  },
                  "env": {
                    "items": {
                      "type": "string"
                    },
                    "default": {},
                    "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": [
                    {
                      "additionalProperties": true,
                      "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": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      }
                    ]
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ]
            },
            "github": {
              "anyOf": [
                {
                  "enum": [
                    "all",
                    "read_only"
                  ],
                  "type": "string"
                },
                {
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "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": {
                      "default": [],
                      "items": {
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "repos"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "github"
          ],
          "type": "object"
        },
        "skills": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "path": {
                "type": "string"
              },
              "repository": {
                "anyOf": [
                  {
                    "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": "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": [
                    {
                      "format": "date-time",
                      "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": {
                    "default": 0,
                    "type": "integer"
                  },
                  "cache_read": {
                    "default": 0,
                    "type": "integer"
                  },
                  "input": {
                    "default": 0,
                    "type": "integer"
                  },
                  "model": {
                    "type": "string"
                  },
                  "output": {
                    "default": 0,
                    "type": "integer"
                  },
                  "total": {
                    "default": 0,
                    "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"
    }
  },
  "required": [
    "session"
  ],
  "type": "object"
}
```
