tasks
tasks

Warm a task sandbox

Warm a full idling Run for a cloud task while the user composes: boot a sandbox, clone the repo, check out the branch, and start the agent, then idle awaiting the first message. On submit the normal create+run path transparently reuses and activates this Run; abandoned warms are reaped by the Run's inactivity timeout. Best-effort: returns an empty body when the feature flag is off, the warm pool is full, or the GitHub integration doesn't belong to the team.

post/api/projects/{project_id}/tasks/warm/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/tasks/warm/
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request body

repositorystring nullable

Optional GitHub repository to clone, in organization/repo format (e.g. posthog/posthog).

repositoriesstring[]

GitHub repositories to clone into the warm sandbox, each in organization/repo format.

github_integrationinteger nullable

Primary key of the team's GitHub integration. Required when a repository is selected (it is what the sandbox clones with). Accepted without a repository too: the warm Run then boots with that integration's GitHub credentials, matching a repo-less create that carries it.

branchstring nullable

Branch to check out in the warm sandbox. Defaults to the repository's default branch when omitted.

modelstring nullable

LLM model identifier to warm the sandbox on. A submit selecting a different model won't reuse this warm Run.

sandbox_environment_idstring uuid nullable

Optional sandbox environment to provision before the task is submitted.

custom_image_idstring uuid nullable

Optional custom base image to provision before the task is submitted; takes precedence over the environment's image.

origin_product'user_created' | 'posthog_ai' | 'signal_report'
  • user_created - user_created
  • posthog_ai - posthog_ai
  • signal_report - signal_report
signal_reportstring uuid nullable

Inbox report the warm discussion is about. Required with origin_product signal_report, where the warm Run boots repo-less and the submit that creates the report's discussion task activates it.

Response

Warm Run provisioned (task_id/run_id to activate on submit), or an empty body when the feature is off, capped, or the integration didn't resolve.

task_idstring uuid required

Id of the draft Task birthed for the warm Run.

run_idstring uuid required

Id of the idling warm Run. The normal create+run path reuses and activates it on submit.

Changes

No recorded changes to this operation across all 1 revision of this API.