---
title: "Launch a draft session"
method: POST
path: "/sessions/{id}/launch"
tags: ["Sessions"]
---

# Launch a draft session

`POST /sessions/{id}/launch`

Launch a draft session, transitioning it from draft to running state

## Path parameters

- `id` string, required

## Request body

- object
  - `prompt` string, required — Initial prompt to send to Claude
  - `createDirectoryIfNotExists` boolean — Create working directory if it doesn't exist

## Response `200`

Session launched successfully

- SessionResponse
  - `data` Session, required
    - `id` string, required — Unique session identifier
    - `run_id` string, required — Unique run identifier
    - `claude_session_id` string — Claude's internal session ID
    - `parent_session_id` string — Parent session ID if this is a forked session
    - `status` 'draft' | 'starting' | 'running' | 'completed' | 'failed' | 'interrupting' | 'interrupted' | 'waiting_input' | 'discarded', required — Current status of the session
    - `query` string, required — Initial query that started the session
    - `summary` string — AI-generated summary of the session
    - `title` string — User-editable session title
    - `model` string — Model used for this session
    - `model_id` string — Full model identifier
    - `working_dir` string — Working directory for the session
    - `additional_directories` string[] — Additional directories Claude can access
    - `created_at` string, date-time, required — Session creation timestamp
    - `last_activity_at` string, date-time, required — Last activity timestamp
    - `completed_at` string, date-time, nullable — Session completion timestamp
    - `error_message` string — Error message if session failed
    - `cost_usd` number, float, nullable — Total cost in USD
    - `input_tokens` integer, nullable — Number of input tokens
    - `output_tokens` integer, nullable — Number of output tokens
    - `cache_creation_input_tokens` integer, nullable — Number of cache creation input tokens
    - `cache_read_input_tokens` integer, nullable — Number of cache read input tokens
    - `effective_context_tokens` integer, nullable — Total tokens counting toward context window limit
    - `context_limit` integer, nullable — Context window limit for the model
    - `duration_ms` integer, nullable — Session duration in milliseconds
    - `auto_accept_edits` boolean — Whether edit tools are auto-accepted
    - `dangerously_skip_permissions` boolean — When true, all tool calls are automatically approved without user consent
    - `dangerously_skip_permissions_expires_at` string, date-time, nullable — ISO timestamp when dangerously skip permissions mode expires (optional)
    - `archived` boolean — Whether session is archived
    - `proxy_enabled` boolean — Whether proxy is enabled for this session
    - `proxy_base_url` string — Base URL of the proxy server
    - `proxy_model_override` string — Model to use with the proxy
    - `editor_state` string, nullable — JSON blob of editor state for draft sessions

## Other responses

- `400` — Session is not in draft state
- `404` — Resource not found
- `422` — Directory does not exist and needs to be created
- `500` — Internal server error

---

[API](https://skmtc.net/humanlayer/apis/humanlayer-daemon-rest-api.md) · [All operations](https://skmtc.net/humanlayer/apis/humanlayer-daemon-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/humanlayer/humanlayer-daemon-rest-api/versions/02da8cb8aa12/schema)
