PostHog · Schema

CodexTaskRunCreateSchema

Request body for creating a new task run

A/B TestingAnalyticsFeature FlagsOpen SourceProduct AnalyticsSession Recording

Properties

Name Type Description
mode object Execution mode: 'interactive' for user-connected runs, 'background' for autonomous runs * `interactive` - interactive * `background` - background
branch string Git branch to checkout in the sandbox
resume_from_run_id string ID of a previous run to resume from. Must belong to the same task.
pending_user_message string Initial or follow-up user message to include in the run prompt.
pending_user_artifact_ids array Identifiers for staged task artifacts that should be attached to the initial run prompt.
sandbox_environment_id string Optional sandbox environment to apply for this cloud run.
pr_authorship_mode object Whether pull requests for this run should be authored by the user or the bot. * `user` - user * `bot` - bot
run_source object High-level source that triggered this run, used to distinguish manual and signal-based cloud runs. * `manual` - manual * `signal_report` - signal_report
signal_report_id string Optional signal report identifier when this run was started from Inbox.
runtime_adapter object Agent runtime adapter to launch for this run. Must be 'codex' for Codex runtimes. * `codex` - codex
model string LLM model identifier to run in the Codex runtime.
reasoning_effort object Reasoning effort to request for models that expose an effort control. * `low` - low * `medium` - medium * `high` - high * `xhigh` - xhigh * `max` - max
github_user_token string Optional GitHub user token from PostHog Code for user-authored cloud pull requests. Prefer linking GitHub from Settings → Linked accounts so the server can manage tokens; this field remains supported
initial_permission_mode object Initial permission mode for Codex runtimes. * `auto` - auto * `read-only` - read-only * `full-access` - full-access
View JSON Schema on GitHub

JSON Schema

posthog-codextaskruncreateschema-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CodexTaskRunCreateSchema",
  "title": "CodexTaskRunCreateSchema",
  "type": "object",
  "description": "Request body for creating a new task run",
  "properties": {
    "mode": {
      "allOf": [
        {
          "$ref": "#/components/schemas/TaskExecutionModeEnum"
        }
      ],
      "default": "background",
      "description": "Execution mode: 'interactive' for user-connected runs, 'background' for autonomous runs\n\n* `interactive` - interactive\n* `background` - background"
    },
    "branch": {
      "type": "string",
      "nullable": true,
      "description": "Git branch to checkout in the sandbox",
      "maxLength": 255
    },
    "resume_from_run_id": {
      "type": "string",
      "format": "uuid",
      "description": "ID of a previous run to resume from. Must belong to the same task."
    },
    "pending_user_message": {
      "type": "string",
      "description": "Initial or follow-up user message to include in the run prompt."
    },
    "pending_user_artifact_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 128
      },
      "description": "Identifiers for staged task artifacts that should be attached to the initial run prompt."
    },
    "sandbox_environment_id": {
      "type": "string",
      "format": "uuid",
      "description": "Optional sandbox environment to apply for this cloud run."
    },
    "pr_authorship_mode": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PrAuthorshipModeEnum"
        }
      ],
      "description": "Whether pull requests for this run should be authored by the user or the bot.\n\n* `user` - user\n* `bot` - bot"
    },
    "run_source": {
      "allOf": [
        {
          "$ref": "#/components/schemas/RunSourceEnum"
        }
      ],
      "description": "High-level source that triggered this run, used to distinguish manual and signal-based cloud runs.\n\n* `manual` - manual\n* `signal_report` - signal_report"
    },
    "signal_report_id": {
      "type": "string",
      "description": "Optional signal report identifier when this run was started from Inbox."
    },
    "runtime_adapter": {
      "allOf": [
        {
          "$ref": "#/components/schemas/CodexRuntimeAdapterEnum"
        }
      ],
      "description": "Agent runtime adapter to launch for this run. Must be 'codex' for Codex runtimes.\n\n* `codex` - codex"
    },
    "model": {
      "type": "string",
      "description": "LLM model identifier to run in the Codex runtime."
    },
    "reasoning_effort": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ReasoningEffortEnum"
        }
      ],
      "description": "Reasoning effort to request for models that expose an effort control.\n\n* `low` - low\n* `medium` - medium\n* `high` - high\n* `xhigh` - xhigh\n* `max` - max"
    },
    "github_user_token": {
      "type": "string",
      "writeOnly": true,
      "description": "Optional GitHub user token from PostHog Code for user-authored cloud pull requests. Prefer linking GitHub from Settings \u2192 Linked accounts so the server can manage tokens; this field remains supported for callers that still manage their own tokens."
    },
    "initial_permission_mode": {
      "allOf": [
        {
          "$ref": "#/components/schemas/CodexTaskRunCreateSchemaInitialPermissionModeEnum"
        }
      ],
      "description": "Initial permission mode for Codex runtimes.\n\n* `auto` - auto\n* `read-only` - read-only\n* `full-access` - full-access"
    }
  },
  "required": [
    "model",
    "runtime_adapter"
  ]
}