---
title: "Spawn a new agent session"
method: POST
path: "/api/v1/sessions"
tags: ["sessions"]
---

# Spawn a new agent session

`POST /api/v1/sessions`

## Request body

- SpawnSessionRequest
  - `branch` string
  - `displayName` string
  - `harness` 'claude-code' | 'codex' | 'aider' | 'opencode' | 'grok' | 'droid' | 'amp' | 'agy' | 'crush' | 'cursor' | 'qwen' | 'copilot' | 'goose' | 'auggie' | 'continue' | 'devin' | 'cline' | 'kimi' | 'kiro' | 'kilocode' | 'vibe' | 'pi' | 'autohand'
  - `issueId` string
  - `kind` 'worker' | 'orchestrator'
  - `projectId` string, required
  - `prompt` string

## Response `201`

Created

- SessionResponse
  - `session` ControllersSessionView, required
    - `activity` DomainActivity, required
      - `lastActivityAt` string, date-time, required
      - `state` string, required
    - `branch` string
    - `createdAt` string, date-time, required
    - `displayName` string
    - `harness` string
    - `id` string, required
    - `isTerminated` boolean, required
    - `issueId` string
    - `kind` string, required
    - `previewRevision` integer
    - `previewUrl` string
    - `projectId` string, required
    - `prs` SessionPRFacts[], required
      - `ci` 'unknown' | 'pending' | 'passing' | 'failing', required
      - `mergeability` 'unknown' | 'mergeable' | 'conflicting' | 'blocked' | 'unstable', required
      - `number` integer, required
      - `review` 'none' | 'approved' | 'changes_requested' | 'review_required', required
      - `reviewComments` boolean, required
      - `state` 'draft' | 'open' | 'merged' | 'closed', required
      - `updatedAt` string, date-time, required
      - `url` string, required
    - `status` 'working' | 'pr_open' | 'draft' | 'ci_failed' | 'review_pending' | 'changes_requested' | 'approved' | 'mergeable' | 'merged' | 'needs_input' | 'idle' | 'terminated' | 'no_signal', required
    - `terminalHandleId` string
    - `updatedAt` string, date-time, required

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-06-30** `c3b36a940fed` — 1 info
  - added the new optional request property `displayName`
- **2026-06-22** `31605d9fa5c7` — 1 info
  - added the optional property `session/previewRevision` to the response with the `201` status
- **2026-06-21** `a6f82f51cdbc` — 1 info
  - added the optional property `session/previewUrl` to the response with the `201` status
- **2026-06-21** `09193e178bfe` — 26 warning
  - added the new `approved` enum value to the `session/prs/items/review` response property for the response status `201`
  - added the new `approved` enum value to the `session/status` response property for the response status `201`
  - added the new `blocked` enum value to the `session/prs/items/mergeability` response property for the response status `201`
  - added the new `changes_requested` enum value to the `session/prs/items/review` response property for the response status `201`
  - …22 more
- **2026-06-21** `f415a0cf3d25` — 1 info
  - added the optional property `session/branch` to the response with the `201` status

[Full history](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/changes/api/v1/sessions/post.md)

---

[API](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon.md) · [All operations](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/llms.txt) · [OpenAPI document](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/revisions/3cbe4004af21?raw)
