---
title: "Self Create Subtask"
method: POST
path: "/tasks/self-create"
---

# Self Create Subtask

`POST /tasks/self-create`

Create a subtask linked to a parent task.

Agents call this to decompose work during execution.  The parent
task is automatically transitioned to ``WAITING_FOR_SUBTASKS`` on
the first subtask creation (if it is not already in that state).

## Request body

- TaskSelfCreate — Body for POST /tasks/self-create - agent-initiated subtask creation. Agents use this to decompose work into subtasks during execution. The parent_task_id is required and links the new subtask to the calling agent's current task.
  - `parent_task_id` string, required
  - `title` string, required
  - `description` string, required
  - `role` string
  - `priority` integer
  - `scope` string
  - `complexity` string
  - `estimated_minutes` integer, nullable
  - `depends_on` string[]
  - `owned_files` string[]

## Response `201`

Successful Response

- TaskResponse — Serialised task returned by every task endpoint.
  - `id` string, required
  - `title` string, required
  - `description` string, required
  - `role` string, required
  - `tenant_id` string, required
  - `priority` integer, required
  - `scope` string, required
  - `complexity` string, required
  - `eu_ai_act_risk` string, required
  - `approval_required` boolean, required
  - `risk_level` string, required
  - `estimated_minutes` integer, nullable, required
  - `status` string, required
  - `depends_on` string[], required
  - `parent_task_id` string, nullable, required
  - `depends_on_repo` string, nullable, required
  - `owned_files` string[], required
  - `assigned_agent` string, nullable, required
  - `result_summary` string, nullable, required
  - `cell_id` string, nullable, required
  - `repo` string, nullable, required
  - `task_type` string, required
  - `upgrade_details` object, nullable, required
  - `model` string, nullable, required
  - `effort` string, nullable, required
  - `cli` string, nullable
  - `batch_eligible` boolean
  - `completion_signals` object[]
  - `slack_context` object, nullable
  - `metadata` object
  - `created_at` number, required
  - `claimed_at` number, nullable
  - `completed_at` number, nullable
  - `closed_at` number, nullable
  - `deadline` number, nullable
  - `progress_log` ProgressEntry[]
    - `timestamp` number, required
    - `message` string, required
    - `percent` integer, required
  - `version` integer
  - `parent_session_id` string, nullable
  - `retry_count` integer
  - `max_retries` integer
  - `retry_delay_s` number
  - `terminal_reason` string, nullable
  - `max_output_tokens` integer, nullable
  - `meta_messages` string[]
  - `max_turns` integer, nullable

## Other responses

- `404` — Parent task not found
- `422` — Validation Error

---

[API](https://skmtc.net/sipyourdrink-ltd/apis/bernstein-task-server.md) · [All operations](https://skmtc.net/sipyourdrink-ltd/apis/bernstein-task-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sipyourdrink-ltd/bernstein-task-server/versions/86f514b4e920/schema)
