Skip to content

Sessions

CompozyOS Sessions HTTP endpoints.

For people running agent work32 pages in this section
POST
/api/agent/spawn

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Request Body

JSON request body

application/json
  1. body
acp_options?array<>
agent_name*string
Match^[a-z][a-z0-9_-]{0,105}$
Lengthlength <= 106
auto_stop_on_parent*boolean
idempotency_key?string
inherit_permissions?boolean
model?string
name?string
new_worktree?|
notify_creator?boolean|null
permissions*
prompt?string
prompt_overlay?string
provider?string
reasoning_effort?string
spawn_role*string
speed?string
Value in"normal""fast"
toolsets?array<string>
ttl_seconds*integer
Formatint64
workspace?string
worktree?string

Response Body

Created

application/json
  1. response
spawn*
curl -X POST "https://example.com/api/agent/spawn" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string" \  -H "Content-Type: application/json" \  -d '{    "agent_name": "string",    "auto_stop_on_parent": true,    "permissions": {},    "spawn_role": "string",    "ttl_seconds": 0  }'
{  "spawn": {    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "permissions": {      "mcp_servers": [        "string"      ],      "skills": [        "string"      ],      "tools": [        "string"      ],      "workspace_paths": [        "string"      ]    },    "prompt": {      "error": "string",      "message_id": "string",      "reply_watch_id": "string",      "reply_watch_state": "string",      "status": "string"    },    "session": {      "activity": {        "current_tool": "string",        "deadline_at": "2019-08-24T14:15:22Z",        "elapsed_ms": 0,        "elapsed_seconds": 0,        "idle_seconds": 0,        "iteration_current": 0,        "iteration_max": 0,        "last_activity_at": "2019-08-24T14:15:22Z",        "last_activity_detail": "string",        "last_activity_kind": "string",        "last_progress_at": "2019-08-24T14:15:22Z",        "tool_call_id": "string",        "turn_id": "string",        "turn_source": "string",        "turn_started_at": "2019-08-24T14:15:22Z"      },      "agent_name": "string",      "archived_at": "2019-08-24T14:15:22Z",      "attach_expires_at": "2019-08-24T14:15:22Z",      "attachable": true,      "attached_to": "string",      "attention": "string",      "attention_changed_at": "2019-08-24T14:15:22Z",      "available_commands": [        {          "description": "string",          "input": {            "hint": "string"          },          "name": "string"        }      ],      "badge": "running",      "board_column": "needs_you",      "branch": "string",      "busy_input": {        "default_mode": "string",        "steer_capability": "steer_ext",        "steer_delivery": "injected"      },      "children": {        "done": 0,        "in_review": 0,        "needs_you": 0,        "total": 0,        "working": 0      },      "created_at": "2019-08-24T14:15:22Z",      "derivation": {        "first_prompt": "string",        "kind": "",        "native_fork_error": "string",        "native_state": "string",        "seed": "string",        "source_session_id": "string"      },      "diagnostics": [        {          "category": "string",          "code": "string",          "data_freshness": "string",          "doc_url": "string",          "evidence": {            "property1": null,            "property2": null          },          "id": "string",          "message": "string",          "severity": "string",          "suggested_command": "string",          "title": "string"        }      ],      "effective_workspace_access": "string",      "escalated": true,      "failure": {        "crash_bundle_path": "string",        "kind": "string",        "reason_code": "string",        "summary": "string"      },      "folder_id": "string",      "health": {        "active_prompt": true,        "agent_name": "string",        "attachable": true,        "attention": "string",        "eligible_for_wake": true,        "escalated": true,        "health": "healthy",        "ineligibility_reason": "session_prompt_active",        "last_activity_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "last_presence_at": "2019-08-24T14:15:22Z",        "lifecycle_state": "starting",        "session_id": "string",        "state": "idle",        "updated_at": "2019-08-24T14:15:22Z",        "verified": true,        "workspace_id": "string"      },      "id": "string",      "lineage": {        "auto_stop_on_parent": true,        "kind": "",        "notify_creator": true,        "origin_agent_name": "string",        "origin_message_id": "string",        "parent_session_id": "string",        "permission_policy": {          "mcp_servers": [            "string"          ],          "skills": [            "string"          ],          "tools": [            "string"          ],          "workspace_paths": [            "string"          ]        },        "root_session_id": "string",        "spawn_budget": {          "max_active_per_workspace": 0,          "max_children": 0,          "max_depth": 0,          "ttl_seconds": 0        },        "spawn_depth": 0,        "spawn_role": "string",        "ttl_expires_at": "2019-08-24T14:15:22Z"      },      "monitor_summary": {        "active": 0      },      "name": "string",      "parent_title": "string",      "pending_interactions": [        {          "choices": [            "string"          ],          "created_at": "2019-08-24T14:15:22Z",          "decisions": [            "string"          ],          "interaction_id": "string",          "kind": "string",          "provider_request_id": "string",          "resolution": "string",          "resolved_at": "2019-08-24T14:15:22Z",          "resolved_by": "string",          "status": "string",          "title": "string",          "tool_id": "string",          "turn_id": "string"        }      ],      "profile_archived": true,      "profile_color": "string",      "profile_emoji": "string",      "profile_icon": "string",      "profile_id": "string",      "profile_name": "string",      "pull_request": {        "checks": {          "failed": 0,          "failed_names": [            "string"          ],          "passed": 0,          "pending": 0,          "state": "passing"        },        "draft": true,        "head_sha": "string",        "mergeable": "mergeable",        "number": 0,        "provider": "string",        "ready_to_merge": true,        "review_decision": "approved",        "state": "open",        "url": "string"      },      "pull_request_lookup": {        "cause": "string",        "observed_at": "2019-08-24T14:15:22Z",        "stale": true,        "state": "ok"      },      "queue": {        "cap": 0,        "entries": 0      },      "reply_watches": [        {          "created_at": "2019-08-24T14:15:22Z",          "id": "string",          "message_id": "string",          "state": "string",          "target_session_id": "string"        }      ],      "runtime": {        "acp_caps": {          "config_options": [            {              "category": "string",              "current_bool": true,              "current_value_id": "string",              "description": "string",              "id": "string",              "kind": "string",              "label": "string",              "values": [                {                  "description": "string",                  "group_id": "string",                  "group_label": "string",                  "label": "string",                  "value": "string"                }              ]            }          ],          "prompt_audio": true,          "prompt_embedded_context": true,          "prompt_image": true,          "supported_modes": [            "string"          ],          "supports_fork_session": true,          "supports_load_session": true,          "supports_resume_session": true        },        "acp_session_id": "string",        "effective": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal",          "speed_resolution": {            "reason": "capability_absent",            "requested": "normal",            "status": "applied"          }        },        "failure": "string",        "generation": 0,        "last_known": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal",          "speed_resolution": {            "reason": "capability_absent",            "requested": "normal",            "status": "applied"          }        },        "recovery": {          "attempt": 0,          "generation": 0,          "last_attempt_at": "2019-08-24T14:15:22Z",          "last_error": "string",          "max_attempts": 0,          "next_attempt_at": "2019-08-24T14:15:22Z",          "started_at": "2019-08-24T14:15:22Z"        },        "requested": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal"        },        "selected": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal"        },        "selection_revision": 0,        "status": "string",        "transition": "string"      },      "scope": "string",      "state": "starting",      "stop_cause": "string",      "stop_detail": "string",      "stop_reason": "completed",      "subagent_summary": {        "attention": 0,        "failed": 0,        "live": 0,        "most_urgent": "string",        "total": 0      },      "supervision": {        "quiet_warning": {          "quiet_since": "2019-08-24T14:15:22Z",          "stop_at": "2019-08-24T14:15:22Z",          "warned_at": "2019-08-24T14:15:22Z"        },        "sources": [          {            "error": "string",            "kind": "agent_progress",            "ref": "string",            "state": "string"          }        ],        "work_signals": [          {            "kind": "agent_progress",            "ref": "string",            "since": "2019-08-24T14:15:22Z"          }        ]      },      "transcript_epoch": 0,      "type": "user",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "waiting_on": "sessions",      "workspace_id": "string",      "workspace_path": "string",      "worktree_binding": {        "available": true,        "unavailable_reason": "string"      },      "worktree_id": "string"    },    "worktree": {      "base_sha": "string",      "branch": "string",      "created": true,      "id": "string",      "name": "string",      "path": "string"    }  }}

List sessions

GET
/api/sessions

Query Parameters

workspace_id?string

Workspace id or path

all_workspaces?boolean

Use the explicit all-workspaces aggregate

workspace_ids?array<string>

Project IDs or @user; repeatable, requires all_workspaces

include_health?boolean

Include metadata-only health for returned sessions

skip_total?boolean

Omit the exact catalog count for a bounded cursor read

state?string

Filter by exact session state

Value in"starting""active""stopping""stopped"
type?string

Filter by exact session type

Value in"user""system""coordinator""spawned"
agent?string

Filter by exact agent definition name

subagents?string

Subagent session visibility (default include)

Value in"include""exclude""only"
children?string

Managed child visibility

Value in"include""exclude"
parent?string

Filter by exact parent session id

root?string

Filter by exact root session id (includes the root itself)

worktree?string

Filter by exact bound worktree id

q?string

Search session id, name, agent, or provider; title_agent searches visible title and agent

search_fields?"title_agent"

Select visible title/agent search instead of the default catalog fields

Value in"title_agent"
resumable?boolean

Only list sessions eligible for explicit attach

attention?boolean

Only list sessions in the needs-you attention class

board_column?array<string>

Repeatable board column filter: needs_you, working, in_review, done

badge?string

Filter by comma-separated exact session badges

archive?string

Archived session visibility

Value in"exclude""only""include"
sort?string

Stable session ordering

Value in"recent""created""name""last_activity""attention""navigator""manual"
cursor?string

Opaque next_cursor from the previous page

limit?integer

Sessions per page (1-100)

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
page*
sessions*array<>
curl -X GET "https://example.com/api/sessions"
{  "page": {    "has_more": true,    "limit": 0,    "next_cursor": "string",    "total": 0  },  "sessions": [    {      "activity": {        "current_tool": "string",        "deadline_at": "2019-08-24T14:15:22Z",        "elapsed_ms": 0,        "elapsed_seconds": 0,        "idle_seconds": 0,        "iteration_current": 0,        "iteration_max": 0,        "last_activity_at": "2019-08-24T14:15:22Z",        "last_activity_detail": "string",        "last_activity_kind": "string",        "last_progress_at": "2019-08-24T14:15:22Z",        "tool_call_id": "string",        "turn_id": "string",        "turn_source": "string",        "turn_started_at": "2019-08-24T14:15:22Z"      },      "agent_name": "string",      "archived_at": "2019-08-24T14:15:22Z",      "attach_expires_at": "2019-08-24T14:15:22Z",      "attachable": true,      "attached_to": "string",      "attention": "string",      "attention_changed_at": "2019-08-24T14:15:22Z",      "available_commands": [        {          "description": "string",          "input": {            "hint": "string"          },          "name": "string"        }      ],      "badge": "running",      "board_column": "needs_you",      "branch": "string",      "busy_input": {        "default_mode": "string",        "steer_capability": "steer_ext",        "steer_delivery": "injected"      },      "children": {        "done": 0,        "in_review": 0,        "needs_you": 0,        "total": 0,        "working": 0      },      "created_at": "2019-08-24T14:15:22Z",      "derivation": {        "first_prompt": "string",        "kind": "",        "native_fork_error": "string",        "native_state": "string",        "seed": "string",        "source_session_id": "string"      },      "diagnostics": [        {          "category": "string",          "code": "string",          "data_freshness": "string",          "doc_url": "string",          "evidence": {            "property1": null,            "property2": null          },          "id": "string",          "message": "string",          "severity": "string",          "suggested_command": "string",          "title": "string"        }      ],      "effective_workspace_access": "string",      "escalated": true,      "failure": {        "crash_bundle_path": "string",        "kind": "string",        "reason_code": "string",        "summary": "string"      },      "folder_id": "string",      "health": {        "active_prompt": true,        "agent_name": "string",        "attachable": true,        "attention": "string",        "eligible_for_wake": true,        "escalated": true,        "health": "healthy",        "ineligibility_reason": "session_prompt_active",        "last_activity_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "last_presence_at": "2019-08-24T14:15:22Z",        "lifecycle_state": "starting",        "session_id": "string",        "state": "idle",        "updated_at": "2019-08-24T14:15:22Z",        "verified": true,        "workspace_id": "string"      },      "id": "string",      "lineage": {        "auto_stop_on_parent": true,        "kind": "",        "notify_creator": true,        "origin_agent_name": "string",        "origin_message_id": "string",        "parent_session_id": "string",        "permission_policy": {          "mcp_servers": [            "string"          ],          "skills": [            "string"          ],          "tools": [            "string"          ],          "workspace_paths": [            "string"          ]        },        "root_session_id": "string",        "spawn_budget": {          "max_active_per_workspace": 0,          "max_children": 0,          "max_depth": 0,          "ttl_seconds": 0        },        "spawn_depth": 0,        "spawn_role": "string",        "ttl_expires_at": "2019-08-24T14:15:22Z"      },      "monitor_summary": {        "active": 0      },      "name": "string",      "parent_title": "string",      "pending_interactions": [        {          "choices": [            "string"          ],          "created_at": "2019-08-24T14:15:22Z",          "decisions": [            "string"          ],          "interaction_id": "string",          "kind": "string",          "provider_request_id": "string",          "resolution": "string",          "resolved_at": "2019-08-24T14:15:22Z",          "resolved_by": "string",          "status": "string",          "title": "string",          "tool_id": "string",          "turn_id": "string"        }      ],      "profile_archived": true,      "profile_color": "string",      "profile_emoji": "string",      "profile_icon": "string",      "profile_id": "string",      "profile_name": "string",      "pull_request": {        "checks": {          "failed": 0,          "failed_names": [            "string"          ],          "passed": 0,          "pending": 0,          "state": "passing"        },        "draft": true,        "head_sha": "string",        "mergeable": "mergeable",        "number": 0,        "provider": "string",        "ready_to_merge": true,        "review_decision": "approved",        "state": "open",        "url": "string"      },      "pull_request_lookup": {        "cause": "string",        "observed_at": "2019-08-24T14:15:22Z",        "stale": true,        "state": "ok"      },      "queue": {        "cap": 0,        "entries": 0      },      "reply_watches": [        {          "created_at": "2019-08-24T14:15:22Z",          "id": "string",          "message_id": "string",          "state": "string",          "target_session_id": "string"        }      ],      "runtime": {        "acp_caps": {          "config_options": [            {              "category": "string",              "current_bool": true,              "current_value_id": "string",              "description": "string",              "id": "string",              "kind": "string",              "label": "string",              "values": [                {                  "description": "string",                  "group_id": "string",                  "group_label": "string",                  "label": "string",                  "value": "string"                }              ]            }          ],          "prompt_audio": true,          "prompt_embedded_context": true,          "prompt_image": true,          "supported_modes": [            "string"          ],          "supports_fork_session": true,          "supports_load_session": true,          "supports_resume_session": true        },        "acp_session_id": "string",        "effective": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal",          "speed_resolution": {            "reason": "capability_absent",            "requested": "normal",            "status": "applied"          }        },        "failure": "string",        "generation": 0,        "last_known": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal",          "speed_resolution": {            "reason": "capability_absent",            "requested": "normal",            "status": "applied"          }        },        "recovery": {          "attempt": 0,          "generation": 0,          "last_attempt_at": "2019-08-24T14:15:22Z",          "last_error": "string",          "max_attempts": 0,          "next_attempt_at": "2019-08-24T14:15:22Z",          "started_at": "2019-08-24T14:15:22Z"        },        "requested": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal"        },        "selected": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal"        },        "selection_revision": 0,        "status": "string",        "transition": "string"      },      "scope": "string",      "state": "starting",      "stop_cause": "string",      "stop_detail": "string",      "stop_reason": "completed",      "subagent_summary": {        "attention": 0,        "failed": 0,        "live": 0,        "most_urgent": "string",        "total": 0      },      "supervision": {        "quiet_warning": {          "quiet_since": "2019-08-24T14:15:22Z",          "stop_at": "2019-08-24T14:15:22Z",          "warned_at": "2019-08-24T14:15:22Z"        },        "sources": [          {            "error": "string",            "kind": "agent_progress",            "ref": "string",            "state": "string"          }        ],        "work_signals": [          {            "kind": "agent_progress",            "ref": "string",            "since": "2019-08-24T14:15:22Z"          }        ]      },      "transcript_epoch": 0,      "type": "user",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "waiting_on": "sessions",      "workspace_id": "string",      "workspace_path": "string",      "worktree_binding": {        "available": true,        "unavailable_reason": "string"      },      "worktree_id": "string"    }  ]}

Create a session

POST
/api/sessions

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
agent_name?string
Match^(?:|[a-z][a-z0-9_-]{0,105})$
Lengthlength <= 106
folder_id?string
lineage_kind?string
name?string
new_worktree?|
parent_session_id?string
scope?string
workspace?string
workspace_path?string
worktree?string

Response Body

Created

application/json
  1. response
session*
curl -X POST "https://example.com/api/sessions" \  -H "Content-Type: application/json" \  -d '{}'
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
GET
/api/sessions/attention-summary

Response Body

OK

application/json
  1. response
by_workspace*array<>
finished*integer
needs_you*integer
curl -X GET "https://example.com/api/sessions/attention-summary"
{  "by_workspace": [    {      "finished": 0,      "needs_you": 0,      "workspace_id": "string"    }  ],  "finished": 0,  "needs_you": 0}
GET
/api/sessions/catalog-stream

Query Parameters

workspace_id?string

Workspace id or path

all_workspaces?boolean

Subscribe to the explicit all-workspaces aggregate

last_event_id?string

Resume cursor when Last-Event-ID cannot be set; the header takes precedence

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Header Parameters

Last-Event-ID?string

Resume after this catalog sequence

Response Body

WebSocket upgrade; each text message contains one complete SSE frame

curl -X GET "https://example.com/api/sessions/catalog-stream"
Empty
GET
/api/sessions/facets

Query Parameters

workspace_id?string

Workspace id or path

all_workspaces?boolean

Use the explicit all-workspaces aggregate

workspace_ids?array<string>

Project IDs or @user; repeatable, requires all_workspaces

worktree?string

Filter by bound worktree id

agent?string

Filter by exact agent name

subagents?string

Subagent session visibility (default include)

Value in"include""exclude""only"
children?string

Managed child visibility

Value in"include""exclude"
parent?string

Filter by exact parent session id

root?string

Filter by exact root session id (includes the root itself)

resumable?boolean

Only count sessions eligible for explicit attach

state?string

Filter by exact session state

Value in"starting""active""stopping""stopped"
type?string

Filter by exact session type

Value in"user""system""coordinator""spawned"
archive?string

Archived session visibility

Value in"exclude""only""include"
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

Exact scope counts, independent of text query and selected badge

application/json
  1. response
by_profile*array<>
by_workspace*array<>
facets*
curl -X GET "https://example.com/api/sessions/facets"
{  "by_profile": [    {      "facets": {        "all": 0,        "board": {          "done": 0,          "in_review": 0,          "needs_you": 0,          "working": 0        },        "finished": 0,        "idle": 0,        "needs_you": 0,        "terminal_approvals": 0,        "working": 0      },      "profile_id": "string"    }  ],  "by_workspace": [    {      "facets": {        "all": 0,        "board": {          "done": 0,          "in_review": 0,          "needs_you": 0,          "working": 0        },        "finished": 0,        "idle": 0,        "needs_you": 0,        "terminal_approvals": 0,        "working": 0      },      "workspace_id": "string"    }  ],  "facets": {    "all": 0,    "board": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "working": 0    },    "finished": 0,    "idle": 0,    "needs_you": 0,    "terminal_approvals": 0,    "working": 0  }}
GET
/api/sessions/{session_id}

Path Parameters

session_id*string

Session id

Query Parameters

include_health?boolean

Include metadata-only session health when available

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
session*
curl -X GET "https://example.com/api/sessions/string"
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
GET
/api/sessions/{session_id}/events

Path Parameters

session_id*string

Session id

Query Parameters

since?string

Only events emitted since this timestamp

Formatdate-time
limit?integer

Maximum number of records to return; defaults to the newest 200 and is capped at 1000

Formatint32
after_sequence?integer

Only return events after this sequence number

Formatint64
type?string

Event type

agent_name?string

Agent name

turn_id?string

Turn id

archive?string

Select active, archived, or all events

Value in"active""archived""all"
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
events*array<>
curl -X GET "https://example.com/api/sessions/string/events"
{  "events": [    {      "actor_id": "string",      "actor_kind": "string",      "agent_name": "string",      "claim_token_hash": "string",      "content": null,      "coordinator_session_id": "string",      "failure": {        "crash_bundle_path": "string",        "kind": "string",        "reason_code": "string",        "summary": "string"      },      "generation": 0,      "goal": {        "generation": 0,        "item_index": 0,        "kind": "goal-work",        "node_id": "string",        "prompt_attempt": 0,        "prompt_id": "string",        "run_id": "string",        "turn": 0      },      "hook_event": "string",      "hook_name": "string",      "id": "string",      "lease_until": "2019-08-24T14:15:22Z",      "origin": {        "agent_name": "string",        "hop": 0,        "in_reply_to": "string",        "kind": "string",        "notify_on_complete": true,        "reply_watch_id": "string",        "session_id": "string",        "title_at_send": "string",        "workspace_id": "string"      },      "parent_session_id": "string",      "provider_error": {        "code": "string",        "first_seen_at": "2019-08-24T14:15:22Z",        "guidance": "string",        "last_seen_at": "2019-08-24T14:15:22Z",        "next_action": "string",        "occurrence_count": 0,        "provider": "string"      },      "release_reason": "string",      "root_session_id": "string",      "run_id": "string",      "scheduler_reason": "string",      "sequence": 0,      "session_id": "string",      "spawn_depth": 0,      "stop_detail": "string",      "stop_reason": "completed",      "task_id": "string",      "timestamp": "2019-08-24T14:15:22Z",      "turn_id": "string",      "type": "string",      "workflow_id": "string",      "workspace_id": "string",      "workspace_path": "string",      "worktree_id": "string"    }  ]}
GET
/api/sessions/{session_id}/history

Path Parameters

session_id*string

Session id

Query Parameters

since?string

Only events emitted since this timestamp

Formatdate-time
limit?integer

Maximum number of turns to return; defaults to the newest 200 and is capped at 1000

Formatint32
after_sequence?integer

Only return events after this sequence number

Formatint64
type?string

Event type

agent_name?string

Agent name

turn_id?string

Turn id

archive?string

Select active, archived, or all events

Value in"active""archived""all"
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
history*array<>
curl -X GET "https://example.com/api/sessions/string/history"
{  "history": [    {      "events": [        {          "actor_id": "string",          "actor_kind": "string",          "agent_name": "string",          "claim_token_hash": "string",          "content": null,          "coordinator_session_id": "string",          "failure": {            "crash_bundle_path": "string",            "kind": "string",            "reason_code": "string",            "summary": "string"          },          "generation": 0,          "goal": {            "generation": 0,            "item_index": 0,            "kind": "goal-work",            "node_id": "string",            "prompt_attempt": 0,            "prompt_id": "string",            "run_id": "string",            "turn": 0          },          "hook_event": "string",          "hook_name": "string",          "id": "string",          "lease_until": "2019-08-24T14:15:22Z",          "origin": {            "agent_name": "string",            "hop": 0,            "in_reply_to": "string",            "kind": "string",            "notify_on_complete": true,            "reply_watch_id": "string",            "session_id": "string",            "title_at_send": "string",            "workspace_id": "string"          },          "parent_session_id": "string",          "provider_error": {            "code": "string",            "first_seen_at": "2019-08-24T14:15:22Z",            "guidance": "string",            "last_seen_at": "2019-08-24T14:15:22Z",            "next_action": "string",            "occurrence_count": 0,            "provider": "string"          },          "release_reason": "string",          "root_session_id": "string",          "run_id": "string",          "scheduler_reason": "string",          "sequence": 0,          "session_id": "string",          "spawn_depth": 0,          "stop_detail": "string",          "stop_reason": "completed",          "task_id": "string",          "timestamp": "2019-08-24T14:15:22Z",          "turn_id": "string",          "type": "string",          "workflow_id": "string",          "workspace_id": "string",          "workspace_path": "string",          "worktree_id": "string"        }      ],      "turn_id": "string"    }  ]}
GET
/api/sessions/{session_id}/owner

Path Parameters

session_id*string

Session id

Response Body

OK

application/json
  1. response
session_id*string
workspace_id*string
workspace_name*string
curl -X GET "https://example.com/api/sessions/string/owner"
{  "session_id": "string",  "workspace_id": "string",  "workspace_name": "string"}
POST
/api/sessions/{session_id}/pull-request/refresh

Path Parameters

session_id*string

Session id

Query Parameters

profile?string

Act as this profile by name

Response Body

Refreshed or retained cached facts

application/json
  1. response
branch*string
pull_request*|
pull_request_lookup*|
session_id*string
curl -X POST "https://example.com/api/sessions/string/pull-request/refresh"
{  "branch": "string",  "pull_request": {    "checks": {      "failed": 0,      "failed_names": [        "string"      ],      "passed": 0,      "pending": 0,      "state": "passing"    },    "draft": true,    "head_sha": "string",    "mergeable": "mergeable",    "number": 0,    "provider": "string",    "ready_to_merge": true,    "review_decision": "approved",    "state": "open",    "url": "string"  },  "pull_request_lookup": {    "cause": "string",    "observed_at": "2019-08-24T14:15:22Z",    "stale": true,    "state": "ok"  },  "session_id": "string"}
GET
/api/sessions/{session_id}/status

Path Parameters

session_id*string

Session id

Query Parameters

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
active_prompt*boolean
agent_name*string
attachable*boolean
attention?string
badge*string
Value in"running""idle""unhealthy""hung""waiting-for-auth""waiting-for-input""done""stopped""failed""unknown""needs-attention""waiting"
derivation?|
diagnostics?array<>
eligible_for_wake*boolean
escalated?boolean|null
health*string
Value in"healthy""degraded""stale""dead""unknown"
ineligibility_reason?string
Value in"session_prompt_active""session_not_attachable""session_unhealthy""session_health_stale""session_health_hung""session_health_dead""session_health_unknown"
lifecycle_state?string
Value in"starting""active""stopping""stopped"
lineage?|
pending_interactions*array<>
queue?|
reply_watches?array<>
session_id*string
state*string
Value in"idle""prompting""stopped""detached"
updated_at*string
Formatdate-time
verified?boolean|null
wake_state?|
workspace_id*string
curl -X GET "https://example.com/api/sessions/string/status"
{  "active_prompt": true,  "agent_name": "string",  "attachable": true,  "attention": "string",  "badge": "running",  "derivation": {    "first_prompt": "string",    "kind": "",    "native_fork_error": "string",    "native_state": "string",    "seed": "string",    "source_session_id": "string"  },  "diagnostics": [    {      "category": "string",      "code": "string",      "data_freshness": "string",      "doc_url": "string",      "evidence": {        "property1": null,        "property2": null      },      "id": "string",      "message": "string",      "severity": "string",      "suggested_command": "string",      "title": "string"    }  ],  "eligible_for_wake": true,  "escalated": true,  "health": "healthy",  "ineligibility_reason": "session_prompt_active",  "lifecycle_state": "starting",  "lineage": {    "auto_stop_on_parent": true,    "kind": "",    "notify_creator": true,    "origin_agent_name": "string",    "origin_message_id": "string",    "parent_session_id": "string",    "permission_policy": {      "mcp_servers": [        "string"      ],      "skills": [        "string"      ],      "tools": [        "string"      ],      "workspace_paths": [        "string"      ]    },    "root_session_id": "string",    "spawn_budget": {      "max_active_per_workspace": 0,      "max_children": 0,      "max_depth": 0,      "ttl_seconds": 0    },    "spawn_depth": 0,    "spawn_role": "string",    "ttl_expires_at": "2019-08-24T14:15:22Z"  },  "pending_interactions": [    {      "choices": [        "string"      ],      "created_at": "2019-08-24T14:15:22Z",      "decisions": [        "string"      ],      "interaction_id": "string",      "kind": "string",      "provider_request_id": "string",      "resolution": "string",      "resolved_at": "2019-08-24T14:15:22Z",      "resolved_by": "string",      "status": "string",      "title": "string",      "tool_id": "string",      "turn_id": "string"    }  ],  "queue": {    "cap": 0,    "entries": 0  },  "reply_watches": [    {      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "message_id": "string",      "state": "string",      "target_session_id": "string"    }  ],  "session_id": "string",  "state": "idle",  "updated_at": "2019-08-24T14:15:22Z",  "verified": true,  "wake_state": {    "agent_name": "string",    "coalesced_count": 0,    "last_reason": "wake_sent",    "last_result": "sent",    "last_wake_at": "2019-08-24T14:15:22Z",    "next_allowed_at": "2019-08-24T14:15:22Z",    "policy_snapshot_id": "string",    "session_id": "string",    "updated_at": "2019-08-24T14:15:22Z",    "workspace_id": "string"  },  "workspace_id": "string"}
GET
/api/sessions/{session_id}/stream

Path Parameters

session_id*string

Session id

Query Parameters

after_sequence?integer

Initial cursor when Last-Event-ID is not supplied

Formatint64
frames?string

Frame mode; transcript is the default and raw preserves persisted event frames

Value in"raw""transcript"
epoch?integer

Expected transcript epoch for a fenced reconnect

Formatint64
generation?integer

Expected materialized projection generation for a fenced reconnect

Formatint64
limit?integer

Maximum entries per transcript snapshot or change batch

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Header Parameters

Last-Event-ID?string

Resume after the last applied SSE cursor; transcript reconnects also require epoch and generation

Response Body

Session event stream

text/event-stream
  1. response
session_id*string
subagents*array<>
curl -X GET "https://example.com/api/sessions/string/stream"
{  "session_id": "string",  "subagents": [    {      "child_activity": "working",      "child_session_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "delivery": "string",      "depth": 0,      "error": "string",      "hint": "string",      "isolation": "string",      "origin": "string",      "parent_session_id": "string",      "parent_turn_id": "string",      "progress": "string",      "provider_tool_call_id": "string",      "result": "string",      "result_preview": "string",      "result_truncated": true,      "role": "string",      "runtime": {        "agent": "string",        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "string"      },      "settled_at": "2019-08-24T14:15:22Z",      "started_at": "2019-08-24T14:15:22Z",      "status": "string",      "subagent_id": "string",      "title": "string",      "updated_at": "2019-08-24T14:15:22Z",      "wait_timed_out": true,      "work_state": "string",      "workspace_id": "string",      "worktree": {        "base_ref": "string",        "base_sha": "string",        "branch": "string",        "commits_ahead": 0,        "dirty_files": 0,        "head_sha": "string",        "id": "string",        "name": "string",        "observed_at": "2019-08-24T14:15:22Z",        "path": "string",        "pull_request": {          "number": 0,          "state": "string",          "url": "string"        },        "pull_request_status": "string"      }    }  ]}
GET
/api/sessions/{session_id}/transcript

Path Parameters

session_id*string

Session id

Query Parameters

limit?integer

Maximum page size; defaults to the newest 200 entries and is capped at 1000

Formatint32
before_sequence?integer

Return entries whose stable start sequence is before this cursor

Formatint64
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
entries*array<>
epoch*integer
Formatint64
generation*integer
Formatint64
has_older*boolean
limit*integer
max_sequence*integer
Formatint64
next_before_sequence?integer
Formatint64
curl -X GET "https://example.com/api/sessions/string/transcript"
{  "entries": [    {      "message": {        "id": "string",        "metadata": null,        "parts": [          {            "data": null,            "errorText": "string",            "filename": "string",            "id": "string",            "input": null,            "mediaType": "string",            "output": null,            "parentToolCallId": "string",            "preliminary": true,            "rawInput": null,            "state": "string",            "text": "string",            "title": "string",            "toolCallId": "string",            "toolName": "string",            "type": "string",            "url": "string"          }        ],        "role": "string"      },      "sequence": 0,      "start_sequence": 0    }  ],  "epoch": 0,  "generation": 0,  "has_older": true,  "limit": 0,  "max_sequence": 0,  "next_before_sequence": 0}
GET
/api/sessions/{session_id}/transcript/outline

Path Parameters

session_id*string

Session id

Query Parameters

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
entries*array<>
curl -X GET "https://example.com/api/sessions/string/transcript/outline"
{  "entries": [    {      "at": "2019-08-24T14:15:22Z",      "preview": "string",      "reply_preview": "string",      "sequence": 0,      "turn_id": "string"    }  ]}
GET
/api/sessions/{session_id}/transcript/search

Path Parameters

session_id*string

Session id

Query Parameters

q*string

Literal case-insensitive text; 1 to 4096 bytes

limit?integer

Maximum matches; defaults to 200, capped at 1000; truncated reports omitted matches

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
matches*array<>
truncated*boolean
curl -X GET "https://example.com/api/sessions/string/transcript/search?q=string"
{  "matches": [    {      "field": "string",      "part_index": 0,      "role": "string",      "sequence": 0,      "snippet": "string",      "turn_id": "string"    }  ],  "truncated": true}
GET
/api/workspaces/{workspace_id}/session-folders

Path Parameters

workspace_id*string

Workspace id

Query Parameters

profile?string

Act as this profile by name

Response Body

OK

application/json
  1. response
folders*array<>
curl -X GET "https://example.com/api/workspaces/string/session-folders"
{  "folders": [    {      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "name": "string",      "position": 0,      "profile_id": "string",      "session_count": 0,      "updated_at": "2019-08-24T14:15:22Z",      "workspace_id": "string"    }  ]}

Create a session folder

POST
/api/workspaces/{workspace_id}/session-folders

Path Parameters

workspace_id*string

Workspace id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
name*string

Response Body

OK

application/json
  1. response
folder*
curl -X POST "https://example.com/api/workspaces/string/session-folders" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "folder": {    "created_at": "2019-08-24T14:15:22Z",    "id": "string",    "name": "string",    "position": 0,    "profile_id": "string",    "session_count": 0,    "updated_at": "2019-08-24T14:15:22Z",    "workspace_id": "string"  }}

Rename a session folder

PATCH
/api/workspaces/{workspace_id}/session-folders/{folder_id}

Path Parameters

workspace_id*string

Workspace id

folder_id*string

Session folder id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
name*string

Response Body

OK

application/json
  1. response
folder*
curl -X PATCH "https://example.com/api/workspaces/string/session-folders/string" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "folder": {    "created_at": "2019-08-24T14:15:22Z",    "id": "string",    "name": "string",    "position": 0,    "profile_id": "string",    "session_count": 0,    "updated_at": "2019-08-24T14:15:22Z",    "workspace_id": "string"  }}
DELETE
/api/workspaces/{workspace_id}/session-folders/{folder_id}

Path Parameters

workspace_id*string

Workspace id

folder_id*string

Session folder id

Query Parameters

profile?string

Act as this profile by name

Response Body

OK

application/json
  1. response
folders*array<>
curl -X DELETE "https://example.com/api/workspaces/string/session-folders/string"
{  "folders": [    {      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "name": "string",      "position": 0,      "profile_id": "string",      "session_count": 0,      "updated_at": "2019-08-24T14:15:22Z",      "workspace_id": "string"    }  ]}
PUT
/api/workspaces/{workspace_id}/session-order/folders

Path Parameters

workspace_id*string

Workspace id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
folder_ids*array<string>

Response Body

OK

application/json
  1. response
folders*array<>
curl -X PUT "https://example.com/api/workspaces/string/session-order/folders" \  -H "Content-Type: application/json" \  -d '{    "folder_ids": [      "string"    ]  }'
{  "folders": [    {      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "name": "string",      "position": 0,      "profile_id": "string",      "session_count": 0,      "updated_at": "2019-08-24T14:15:22Z",      "workspace_id": "string"    }  ]}
PUT
/api/workspaces/{workspace_id}/session-order/sessions

Path Parameters

workspace_id*string

Workspace id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
folder_id?string
session_ids*array<string>

Response Body

OK

application/json
  1. response
folders*array<>
curl -X PUT "https://example.com/api/workspaces/string/session-order/sessions" \  -H "Content-Type: application/json" \  -d '{    "session_ids": [      "string"    ]  }'
{  "folders": [    {      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "name": "string",      "position": 0,      "profile_id": "string",      "session_count": 0,      "updated_at": "2019-08-24T14:15:22Z",      "workspace_id": "string"    }  ]}

List sessions

GET
/api/workspaces/{workspace_id}/sessions

Path Parameters

workspace_id*string

Workspace id

Query Parameters

workspace_ids?array<string>

Project IDs or @user; repeatable, requires all_workspaces

include_health?boolean

Include metadata-only health for returned sessions

skip_total?boolean

Omit the exact catalog count for a bounded cursor read

state?string

Filter by exact session state

Value in"starting""active""stopping""stopped"
type?string

Filter by exact session type

Value in"user""system""coordinator""spawned"
agent?string

Filter by exact agent definition name

subagents?string

Subagent session visibility (default include)

Value in"include""exclude""only"
children?string

Managed child visibility

Value in"include""exclude"
parent?string

Filter by exact parent session id

root?string

Filter by exact root session id (includes the root itself)

worktree?string

Filter by exact bound worktree id

q?string

Search session id, name, agent, or provider; title_agent searches visible title and agent

search_fields?"title_agent"

Select visible title/agent search instead of the default catalog fields

Value in"title_agent"
resumable?boolean

Only list sessions eligible for explicit attach

attention?boolean

Only list sessions in the needs-you attention class

board_column?array<string>

Repeatable board column filter: needs_you, working, in_review, done

badge?string

Filter by comma-separated exact session badges

archive?string

Archived session visibility

Value in"exclude""only""include"
sort?string

Stable session ordering

Value in"recent""created""name""last_activity""attention""navigator""manual"
cursor?string

Opaque next_cursor from the previous page

limit?integer

Sessions per page (1-100)

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
page*
sessions*array<>
curl -X GET "https://example.com/api/workspaces/string/sessions"
{  "page": {    "has_more": true,    "limit": 0,    "next_cursor": "string",    "total": 0  },  "sessions": [    {      "activity": {        "current_tool": "string",        "deadline_at": "2019-08-24T14:15:22Z",        "elapsed_ms": 0,        "elapsed_seconds": 0,        "idle_seconds": 0,        "iteration_current": 0,        "iteration_max": 0,        "last_activity_at": "2019-08-24T14:15:22Z",        "last_activity_detail": "string",        "last_activity_kind": "string",        "last_progress_at": "2019-08-24T14:15:22Z",        "tool_call_id": "string",        "turn_id": "string",        "turn_source": "string",        "turn_started_at": "2019-08-24T14:15:22Z"      },      "agent_name": "string",      "archived_at": "2019-08-24T14:15:22Z",      "attach_expires_at": "2019-08-24T14:15:22Z",      "attachable": true,      "attached_to": "string",      "attention": "string",      "attention_changed_at": "2019-08-24T14:15:22Z",      "available_commands": [        {          "description": "string",          "input": {            "hint": "string"          },          "name": "string"        }      ],      "badge": "running",      "board_column": "needs_you",      "branch": "string",      "busy_input": {        "default_mode": "string",        "steer_capability": "steer_ext",        "steer_delivery": "injected"      },      "children": {        "done": 0,        "in_review": 0,        "needs_you": 0,        "total": 0,        "working": 0      },      "created_at": "2019-08-24T14:15:22Z",      "derivation": {        "first_prompt": "string",        "kind": "",        "native_fork_error": "string",        "native_state": "string",        "seed": "string",        "source_session_id": "string"      },      "diagnostics": [        {          "category": "string",          "code": "string",          "data_freshness": "string",          "doc_url": "string",          "evidence": {            "property1": null,            "property2": null          },          "id": "string",          "message": "string",          "severity": "string",          "suggested_command": "string",          "title": "string"        }      ],      "effective_workspace_access": "string",      "escalated": true,      "failure": {        "crash_bundle_path": "string",        "kind": "string",        "reason_code": "string",        "summary": "string"      },      "folder_id": "string",      "health": {        "active_prompt": true,        "agent_name": "string",        "attachable": true,        "attention": "string",        "eligible_for_wake": true,        "escalated": true,        "health": "healthy",        "ineligibility_reason": "session_prompt_active",        "last_activity_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "last_presence_at": "2019-08-24T14:15:22Z",        "lifecycle_state": "starting",        "session_id": "string",        "state": "idle",        "updated_at": "2019-08-24T14:15:22Z",        "verified": true,        "workspace_id": "string"      },      "id": "string",      "lineage": {        "auto_stop_on_parent": true,        "kind": "",        "notify_creator": true,        "origin_agent_name": "string",        "origin_message_id": "string",        "parent_session_id": "string",        "permission_policy": {          "mcp_servers": [            "string"          ],          "skills": [            "string"          ],          "tools": [            "string"          ],          "workspace_paths": [            "string"          ]        },        "root_session_id": "string",        "spawn_budget": {          "max_active_per_workspace": 0,          "max_children": 0,          "max_depth": 0,          "ttl_seconds": 0        },        "spawn_depth": 0,        "spawn_role": "string",        "ttl_expires_at": "2019-08-24T14:15:22Z"      },      "monitor_summary": {        "active": 0      },      "name": "string",      "parent_title": "string",      "pending_interactions": [        {          "choices": [            "string"          ],          "created_at": "2019-08-24T14:15:22Z",          "decisions": [            "string"          ],          "interaction_id": "string",          "kind": "string",          "provider_request_id": "string",          "resolution": "string",          "resolved_at": "2019-08-24T14:15:22Z",          "resolved_by": "string",          "status": "string",          "title": "string",          "tool_id": "string",          "turn_id": "string"        }      ],      "profile_archived": true,      "profile_color": "string",      "profile_emoji": "string",      "profile_icon": "string",      "profile_id": "string",      "profile_name": "string",      "pull_request": {        "checks": {          "failed": 0,          "failed_names": [            "string"          ],          "passed": 0,          "pending": 0,          "state": "passing"        },        "draft": true,        "head_sha": "string",        "mergeable": "mergeable",        "number": 0,        "provider": "string",        "ready_to_merge": true,        "review_decision": "approved",        "state": "open",        "url": "string"      },      "pull_request_lookup": {        "cause": "string",        "observed_at": "2019-08-24T14:15:22Z",        "stale": true,        "state": "ok"      },      "queue": {        "cap": 0,        "entries": 0      },      "reply_watches": [        {          "created_at": "2019-08-24T14:15:22Z",          "id": "string",          "message_id": "string",          "state": "string",          "target_session_id": "string"        }      ],      "runtime": {        "acp_caps": {          "config_options": [            {              "category": "string",              "current_bool": true,              "current_value_id": "string",              "description": "string",              "id": "string",              "kind": "string",              "label": "string",              "values": [                {                  "description": "string",                  "group_id": "string",                  "group_label": "string",                  "label": "string",                  "value": "string"                }              ]            }          ],          "prompt_audio": true,          "prompt_embedded_context": true,          "prompt_image": true,          "supported_modes": [            "string"          ],          "supports_fork_session": true,          "supports_load_session": true,          "supports_resume_session": true        },        "acp_session_id": "string",        "effective": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal",          "speed_resolution": {            "reason": "capability_absent",            "requested": "normal",            "status": "applied"          }        },        "failure": "string",        "generation": 0,        "last_known": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal",          "speed_resolution": {            "reason": "capability_absent",            "requested": "normal",            "status": "applied"          }        },        "recovery": {          "attempt": 0,          "generation": 0,          "last_attempt_at": "2019-08-24T14:15:22Z",          "last_error": "string",          "max_attempts": 0,          "next_attempt_at": "2019-08-24T14:15:22Z",          "started_at": "2019-08-24T14:15:22Z"        },        "requested": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal"        },        "selected": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal"        },        "selection_revision": 0,        "status": "string",        "transition": "string"      },      "scope": "string",      "state": "starting",      "stop_cause": "string",      "stop_detail": "string",      "stop_reason": "completed",      "subagent_summary": {        "attention": 0,        "failed": 0,        "live": 0,        "most_urgent": "string",        "total": 0      },      "supervision": {        "quiet_warning": {          "quiet_since": "2019-08-24T14:15:22Z",          "stop_at": "2019-08-24T14:15:22Z",          "warned_at": "2019-08-24T14:15:22Z"        },        "sources": [          {            "error": "string",            "kind": "agent_progress",            "ref": "string",            "state": "string"          }        ],        "work_signals": [          {            "kind": "agent_progress",            "ref": "string",            "since": "2019-08-24T14:15:22Z"          }        ]      },      "transcript_epoch": 0,      "type": "user",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "waiting_on": "sessions",      "workspace_id": "string",      "workspace_path": "string",      "worktree_binding": {        "available": true,        "unavailable_reason": "string"      },      "worktree_id": "string"    }  ]}

Get one session snapshot

GET
/api/workspaces/{workspace_id}/sessions/{session_id}

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

include_health?boolean

Include metadata-only session health when available

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
session*
curl -X GET "https://example.com/api/workspaces/string/sessions/string"
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}

Rename one user session

PATCH
/api/workspaces/{workspace_id}/sessions/{session_id}

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
name*string

Response Body

OK

application/json
  1. response
session*
curl -X PATCH "https://example.com/api/workspaces/string/sessions/string" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
DELETE
/api/workspaces/{workspace_id}/sessions/{session_id}

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

profile?string

Act as this profile by name

Response Body

No Content

curl -X DELETE "https://example.com/api/workspaces/string/sessions/string"
Empty
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/approve

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

JSON request body

application/json
  1. body
decision*string
request_id*string
turn_id*string

Response Body

OK

application/json
  1. response
decision*string
interaction_id?string
outcome*string
request_id*string
resolved_decision?string
curl -X POST "https://example.com/api/workspaces/string/sessions/string/approve" \  -H "Content-Type: application/json" \  -d '{    "decision": "string",    "request_id": "string",    "turn_id": "string"  }'
{  "decision": "string",  "interaction_id": "string",  "outcome": "string",  "request_id": "string",  "resolved_decision": "string"}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/archive

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

stop?boolean

Stop a live session through the normal stop path before archiving it; a failed stop leaves it unarchived

profile?string

Act as this profile by name

Response Body

OK

application/json
  1. response
session*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/archive"
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/attach

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

JSON request body

application/json
  1. body
attached_to?string
ttl_seconds?integer
Rangevalue <= 86400

Response Body

OK

application/json
  1. response
attach*
session*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/attach" \  -H "Content-Type: application/json" \  -d '{}'
{  "attach": {    "attach_expires_at": "2019-08-24T14:15:22Z",    "attached_at": "2019-08-24T14:15:22Z",    "attached_to": "string",    "session_id": "string"  },  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/attachments

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

Multipart upload with one required binary file field

multipart/form-data
  1. body
file*unknown

Response Body

Created

application/json
  1. response
attachment*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/attachments" \  -F file="null"
{  "attachment": {    "bytes": 0,    "created_at": "2019-08-24T14:15:22Z",    "height": 0,    "id": "string",    "kind": "string",    "mime_type": "string",    "name": "string",    "sha256": "string",    "width": 0  }}
DELETE
/api/workspaces/{workspace_id}/sessions/{session_id}/attachments/{attachment_id}

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

attachment_id*string

Attachment id

Response Body

No Content

curl -X DELETE "https://example.com/api/workspaces/string/sessions/string/attachments/string"
Empty
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/attachments/{attachment_id}/bytes

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

attachment_id*string

Attachment id

Response Body

Attachment bytes

response?unknown*/*
curl -X GET "https://example.com/api/workspaces/string/sessions/string/attachments/string/bytes"
null
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/clarifications

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Response Body

OK

application/json
  1. response
clarifications*array<>
curl -X GET "https://example.com/api/workspaces/string/sessions/string/clarifications"
{  "clarifications": [    {      "agent_name": "string",      "asked_at": "2019-08-24T14:15:22Z",      "choices": [        "string"      ],      "deadline": "2019-08-24T14:15:22Z",      "question": "string",      "request_id": "string",      "session_id": "string"    }  ]}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/clarifications/{request_id}/answer

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

request_id*string

Clarification request id

Request Body

JSON request body

application/json
  1. body
choice_index?integer|null
text?string

Response Body

OK

application/json
  1. response
choice*integer|null
fallback*boolean
text*string
curl -X POST "https://example.com/api/workspaces/string/sessions/string/clarifications/string/answer" \  -H "Content-Type: application/json" \  -d '{}'
{  "choice": 0,  "fallback": true,  "text": "string"}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/clear

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Response Body

OK

application/json
  1. response
session*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/clear"
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/commands

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Response Body

OK

application/json
  1. response
commands*array<>
revision*string
curl -X GET "https://example.com/api/workspaces/string/sessions/string/commands"
{  "commands": [    {      "available": true,      "canonical_token": "string",      "description": "string",      "display_name": "string",      "id": "string",      "input_hint": "string",      "lane": "string",      "placements": [        "string"      ],      "source": {        "id": "string",        "key": "string",        "kind": "string",        "origin": "string",        "scope": "string"      },      "unavailable_reason": "string"    }  ],  "revision": "string"}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/compact

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

JSON request body

body*SessionCompactRequestapplication/json

Response Body

Compaction accepted

application/json
  1. response
command*string
prompt_id*string
session_id*string
status*string
curl -X POST "https://example.com/api/workspaces/string/sessions/string/compact"
{  "command": "string",  "prompt_id": "string",  "session_id": "string",  "status": "string"}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/continue

Path Parameters

workspace_id*string

Workspace id

session_id*string

Source session id

Request Body

JSON request body

application/json
  1. body
agent_name*string
expected_epoch?|
Formatint64
expected_generation?|
Formatint64
expected_max_sequence?|
Formatint64
idempotency_key*string
message?string
name?string
route?integer
runtime?|

Response Body

Recorded outcome replayed

application/json
  1. response
derived*
session?|
curl -X POST "https://example.com/api/workspaces/string/sessions/string/continue" \  -H "Content-Type: application/json" \  -d '{    "agent_name": "string",    "idempotency_key": "string"  }'
{  "derived": {    "acp_session_id": "string",    "child_deleted": true,    "child_session_id": "string",    "first_prompt": "string",    "kind": "string",    "native_fork_error": "string",    "native_state": "string",    "omitted_count": 0,    "origin_agent_name": "string",    "origin_message_id": "string",    "replay_bytes": 0,    "replay_message_count": 0,    "replayed": true,    "seed": "string",    "source_session_id": "string",    "source_turn_in_progress": true,    "through_turn_id": "string",    "truncated": true  },  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/derive/preview

Path Parameters

workspace_id*string

Workspace id

session_id*string

Source session id

Query Parameters

message_id?string

Durable user message to cut through (fork from here)

Response Body

OK

application/json
  1. response
cut?|
message_count*integer
native_fork_possible*boolean
omitted_count*integer
replay_bytes*integer
source_message_count*integer
source_turn_in_progress*boolean
transcript*
truncated*boolean
curl -X GET "https://example.com/api/workspaces/string/sessions/string/derive/preview"
{  "cut": {    "message_id": "string",    "turn_id": "string",    "turn_settled": true  },  "message_count": 0,  "native_fork_possible": true,  "omitted_count": 0,  "replay_bytes": 0,  "source_message_count": 0,  "source_turn_in_progress": true,  "transcript": {    "epoch": 0,    "generation": 0,    "max_sequence": 0  },  "truncated": true}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/files

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

q?string

Search text; empty returns the shallowest entries

limit?integer

Maximum entries returned

Formatint32
Range1 <= value <= 200
Default50
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
entries*array<>
truncated*boolean
curl -X GET "https://example.com/api/workspaces/string/sessions/string/files"
{  "entries": [    {      "kind": "file",      "name": "string",      "path": "string"    }  ],  "truncated": true}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/fork

Path Parameters

workspace_id*string

Workspace id

session_id*string

Source session id

Request Body

JSON request body

application/json
  1. body
expected_epoch?|
Formatint64
expected_generation?|
Formatint64
expected_max_sequence?|
Formatint64
idempotency_key*string
message_id?string
name?string

Response Body

Recorded outcome replayed

application/json
  1. response
derived*
session?|
curl -X POST "https://example.com/api/workspaces/string/sessions/string/fork" \  -H "Content-Type: application/json" \  -d '{    "idempotency_key": "string"  }'
{  "derived": {    "acp_session_id": "string",    "child_deleted": true,    "child_session_id": "string",    "first_prompt": "string",    "kind": "string",    "native_fork_error": "string",    "native_state": "string",    "omitted_count": 0,    "origin_agent_name": "string",    "origin_message_id": "string",    "replay_bytes": 0,    "replay_message_count": 0,    "replayed": true,    "seed": "string",    "source_session_id": "string",    "source_turn_in_progress": true,    "through_turn_id": "string",    "truncated": true  },  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/health

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Response Body

OK

application/json
  1. response
health*
curl -X GET "https://example.com/api/workspaces/string/sessions/string/health"
{  "health": {    "active_prompt": true,    "agent_name": "string",    "attachable": true,    "attention": "string",    "eligible_for_wake": true,    "escalated": true,    "health": "healthy",    "ineligibility_reason": "session_prompt_active",    "last_activity_at": "2019-08-24T14:15:22Z",    "last_error": "string",    "last_presence_at": "2019-08-24T14:15:22Z",    "lifecycle_state": "starting",    "session_id": "string",    "state": "idle",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "workspace_id": "string"  }}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/inspect

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

include_recent_wake_events?boolean

Include recent wake audit rows

Response Body

OK

application/json
  1. response
config_digest?string
diagnostics?array<>
health*
policy_digest?string
session_id*string
wake_events?array<>
wake_state?|
curl -X GET "https://example.com/api/workspaces/string/sessions/string/inspect"
{  "config_digest": "string",  "diagnostics": [    {      "code": "string",      "column": 0,      "field": "string",      "line": 0,      "message": "string",      "owner_surface": "string",      "section": "string",      "severity": "info",      "source_path": "string"    }  ],  "health": {    "active_prompt": true,    "agent_name": "string",    "attachable": true,    "attention": "string",    "eligible_for_wake": true,    "escalated": true,    "health": "healthy",    "ineligibility_reason": "session_prompt_active",    "last_activity_at": "2019-08-24T14:15:22Z",    "last_error": "string",    "last_presence_at": "2019-08-24T14:15:22Z",    "lifecycle_state": "starting",    "session_id": "string",    "state": "idle",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "workspace_id": "string"  },  "policy_digest": "string",  "session_id": "string",  "wake_events": [    {      "agent_name": "string",      "created_at": "2019-08-24T14:15:22Z",      "expires_at": "2019-08-24T14:15:22Z",      "id": "string",      "policy_snapshot_id": "string",      "reason": "wake_sent",      "result": "sent",      "session_id": "string",      "source": "scheduler",      "synthetic_prompt_id": "string",      "workspace_id": "string"    }  ],  "wake_state": {    "agent_name": "string",    "coalesced_count": 0,    "last_reason": "wake_sent",    "last_result": "sent",    "last_wake_at": "2019-08-24T14:15:22Z",    "next_allowed_at": "2019-08-24T14:15:22Z",    "policy_snapshot_id": "string",    "session_id": "string",    "updated_at": "2019-08-24T14:15:22Z",    "workspace_id": "string"  }}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/interactions

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

status?string

Filter by interaction status

Value in"pending""orphaned""resolved""timed_out""canceled"

Response Body

OK

application/json
  1. response
interactions*array<>
curl -X GET "https://example.com/api/workspaces/string/sessions/string/interactions"
{  "interactions": [    {      "choices": [        "string"      ],      "created_at": "2019-08-24T14:15:22Z",      "decisions": [        "string"      ],      "interaction_id": "string",      "kind": "string",      "provider_request_id": "string",      "resolution": "string",      "resolved_at": "2019-08-24T14:15:22Z",      "resolved_by": "string",      "status": "string",      "title": "string",      "tool_id": "string",      "turn_id": "string"    }  ]}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/monitors

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

Success

application/json
  1. response
monitors*array<>
curl -X GET "https://example.com/api/workspaces/string/sessions/string/monitors"
{  "monitors": [    {      "created_at": "2019-08-24T14:15:22Z",      "deadline_at": "2019-08-24T14:15:22Z",      "description": "string",      "exit_code": 0,      "fired_at": "2019-08-24T14:15:22Z",      "kind": "string",      "monitor_id": "string",      "pattern": "string",      "reason": "string",      "session_id": "string",      "status": "string",      "terminal_id": "string",      "until": "string"    }  ]}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/monitors/{monitor_id}/cancel

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

monitor_id*string

Monitor id

Query Parameters

profile?string

Act as this profile by name

Response Body

Success

application/json
  1. response
monitor*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/monitors/string/cancel"
{  "monitor": {    "created_at": "2019-08-24T14:15:22Z",    "deadline_at": "2019-08-24T14:15:22Z",    "description": "string",    "exit_code": 0,    "fired_at": "2019-08-24T14:15:22Z",    "kind": "string",    "monitor_id": "string",    "pattern": "string",    "reason": "string",    "session_id": "string",    "status": "string",    "terminal_id": "string",    "until": "string"  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/move

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
folder_id?string

Response Body

OK

application/json
  1. response
folders*array<>
curl -X POST "https://example.com/api/workspaces/string/sessions/string/move" \  -H "Content-Type: application/json" \  -d '{}'
{  "folders": [    {      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "name": "string",      "position": 0,      "profile_id": "string",      "session_count": 0,      "updated_at": "2019-08-24T14:15:22Z",      "workspace_id": "string"    }  ]}
DELETE
/api/workspaces/{workspace_id}/sessions/{session_id}/parent

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

profile?string

Act as this profile by name

Response Body

OK

application/json
  1. response
session*
curl -X DELETE "https://example.com/api/workspaces/string/sessions/string/parent"
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
PUT
/api/workspaces/{workspace_id}/sessions/{session_id}/parent

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
parent_session_id*string

Response Body

OK

application/json
  1. response
session*
curl -X PUT "https://example.com/api/workspaces/string/sessions/string/parent" \  -H "Content-Type: application/json" \  -d '{    "parent_session_id": "string"  }'
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/presence

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

JSON request body

application/json
  1. body
lease_id?string
visible*boolean

Response Body

Presence lease acquired

application/json
  1. response
lease_id*string
curl -X POST "https://example.com/api/workspaces/string/sessions/string/presence" \  -H "Content-Type: application/json" \  -d '{    "visible": true  }'
{  "lease_id": "string"}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/prompt

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

JSON request body

application/json
  1. body
attachments?array<>
expected_turn_id?string
idempotency_key*string
in_reply_to?string
message?string
message_id*string
messages?array<>
mode?string
runtime?|
supersede?boolean

Response Body

Prompt accepted or Goal command completed; streams UI message chunks for an active turn

  1. response
prompt*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/prompt" \  -H "Content-Type: application/json" \  -d '{    "idempotency_key": "string",    "message_id": "string"  }'
{  "prompt": {    "canceled_queued_entries": 0,    "delivery": "string",    "disposition": "direct",    "entry_id": "string",    "estimated_send_at": "2019-08-24T14:15:22Z",    "goal": {      "outcome": "started",      "reason_code": "goal_not_active",      "replaced_run_id": "string",      "snapshot": {        "bound_session_id": "string",        "cause": "goal_not_active",        "context": {          "diagnostic": "string",          "nudge_ratio": 0.1,          "ratio": 0,          "reported_at": "2019-08-24T14:15:22Z",          "size": 0,          "state": "known",          "used": 0        },        "contract_summary": "string",        "last_verdict": {          "blocking_issues": [            {              "id": "string",              "note": "string"            }          ],          "evaluated_at": "2019-08-24T14:15:22Z",          "evidence_ref": "string",          "outcome": "approved"        },        "live": true,        "node_id": "string",        "objective": "string",        "origin_session_id": "string",        "pause_requested": true,        "run_id": "string",        "run_status": "queued",        "status": "active",        "turn_limit": 0,        "turns_used": 0      }    },    "idempotency_key": "string",    "message_id": "string",    "mode": "string",    "new_turn_id": "string",    "previous_turn_id": "string",    "queue_entry_id": "string",    "queue_generation": 0,    "queue_position": 0,    "replayed": true,    "reply_watch": {      "id": "string",      "state": "string"    },    "status": "string",    "steer_delivery": "injected",    "target_workspace_id": "string",    "turn_id": "string"  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/cancel

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Response Body

Cancellation result

application/json
  1. response
outcome*string
session_id*string
turn_id?string
curl -X POST "https://example.com/api/workspaces/string/sessions/string/prompt/cancel"
{  "outcome": "string",  "session_id": "string",  "turn_id": "string"}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Response Body

Pending session input

application/json
  1. response
inputs*array<>
queue?|
curl -X GET "https://example.com/api/workspaces/string/sessions/string/prompt/queue"
{  "inputs": [    {      "attachments": [        {          "bytes": 0,          "height": 0,          "id": "string",          "kind": "string",          "mime_type": "string",          "name": "string",          "sha256": "string",          "width": 0        }      ],      "delivery": "string",      "enqueued_at": "2019-08-24T14:15:22Z",      "id": "string",      "idempotency_key": "string",      "mentions": [        {          "end": 0,          "kind": "file",          "label": "string",          "start": 0,          "target": "string",          "token": "string"        }      ],      "message_id": "string",      "mode": "string",      "origin": {        "agent_name": "string",        "hop": 0,        "in_reply_to": "string",        "kind": "string",        "notify_on_complete": true,        "reply_watch_id": "string",        "session_id": "string",        "title_at_send": "string",        "workspace_id": "string"      },      "owner_id": "string",      "owner_kind": "string",      "queue_generation": 0,      "runtime": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "session_id": "string",      "skill_invocations": [        {          "command_id": "string",          "end": 0,          "name": "string",          "source": {            "id": "string",            "key": "string",            "kind": "string",            "origin": "string",            "scope": "string"          },          "start": 0,          "token": "string"        }      ],      "status": "queued",      "steer_delivery": "injected",      "target_turn_id": "string",      "text": "string"    }  ],  "queue": {    "cap": 0,    "entries": 0  }}
DELETE
/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Response Body

Per-entry clear outcomes

application/json
  1. response
cleared_count*integer
inputs*array<>
queue_generation*integer
Formatint64
curl -X DELETE "https://example.com/api/workspaces/string/sessions/string/prompt/queue"
{  "cleared_count": 0,  "inputs": [    {      "attachments": [        {          "bytes": 0,          "height": 0,          "id": "string",          "kind": "string",          "mime_type": "string",          "name": "string",          "sha256": "string",          "width": 0        }      ],      "delivery": "string",      "enqueued_at": "2019-08-24T14:15:22Z",      "id": "string",      "idempotency_key": "string",      "mentions": [        {          "end": 0,          "kind": "file",          "label": "string",          "start": 0,          "target": "string",          "token": "string"        }      ],      "message_id": "string",      "mode": "string",      "origin": {        "agent_name": "string",        "hop": 0,        "in_reply_to": "string",        "kind": "string",        "notify_on_complete": true,        "reply_watch_id": "string",        "session_id": "string",        "title_at_send": "string",        "workspace_id": "string"      },      "owner_id": "string",      "owner_kind": "string",      "queue_generation": 0,      "runtime": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "session_id": "string",      "skill_invocations": [        {          "command_id": "string",          "end": 0,          "name": "string",          "source": {            "id": "string",            "key": "string",            "kind": "string",            "origin": "string",            "scope": "string"          },          "start": 0,          "token": "string"        }      ],      "status": "queued",      "steer_delivery": "injected",      "target_turn_id": "string",      "text": "string"    }  ],  "queue_generation": 0}
DELETE
/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

queue_entry_id*string

Queue entry id

Response Body

Queued prompt canceled

application/json
  1. response
prompt*
curl -X DELETE "https://example.com/api/workspaces/string/sessions/string/prompt/queue/string"
{  "prompt": {    "canceled_queued_entries": 0,    "delivery": "string",    "disposition": "direct",    "entry_id": "string",    "estimated_send_at": "2019-08-24T14:15:22Z",    "goal": {      "outcome": "started",      "reason_code": "goal_not_active",      "replaced_run_id": "string",      "snapshot": {        "bound_session_id": "string",        "cause": "goal_not_active",        "context": {          "diagnostic": "string",          "nudge_ratio": 0.1,          "ratio": 0,          "reported_at": "2019-08-24T14:15:22Z",          "size": 0,          "state": "known",          "used": 0        },        "contract_summary": "string",        "last_verdict": {          "blocking_issues": [            {              "id": "string",              "note": "string"            }          ],          "evaluated_at": "2019-08-24T14:15:22Z",          "evidence_ref": "string",          "outcome": "approved"        },        "live": true,        "node_id": "string",        "objective": "string",        "origin_session_id": "string",        "pause_requested": true,        "run_id": "string",        "run_status": "queued",        "status": "active",        "turn_limit": 0,        "turns_used": 0      }    },    "idempotency_key": "string",    "message_id": "string",    "mode": "string",    "new_turn_id": "string",    "previous_turn_id": "string",    "queue_entry_id": "string",    "queue_generation": 0,    "queue_position": 0,    "replayed": true,    "reply_watch": {      "id": "string",      "state": "string"    },    "status": "string",    "steer_delivery": "injected",    "target_workspace_id": "string",    "turn_id": "string"  }}
PUT
/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

queue_entry_id*string

Queue entry id

Request Body

JSON request body

application/json
  1. body
idempotency_key*string
message_id*string
text*string

Response Body

Queued input replaced

application/json
  1. response
input*
curl -X PUT "https://example.com/api/workspaces/string/sessions/string/prompt/queue/string" \  -H "Content-Type: application/json" \  -d '{    "idempotency_key": "string",    "message_id": "string",    "text": "string"  }'
{  "input": {    "attachments": [      {        "bytes": 0,        "height": 0,        "id": "string",        "kind": "string",        "mime_type": "string",        "name": "string",        "sha256": "string",        "width": 0      }    ],    "delivery": "string",    "enqueued_at": "2019-08-24T14:15:22Z",    "id": "string",    "idempotency_key": "string",    "mentions": [      {        "end": 0,        "kind": "file",        "label": "string",        "start": 0,        "target": "string",        "token": "string"      }    ],    "message_id": "string",    "mode": "string",    "origin": {      "agent_name": "string",      "hop": 0,      "in_reply_to": "string",      "kind": "string",      "notify_on_complete": true,      "reply_watch_id": "string",      "session_id": "string",      "title_at_send": "string",      "workspace_id": "string"    },    "owner_id": "string",    "owner_kind": "string",    "queue_generation": 0,    "runtime": {      "acp_options": [        {          "bool_value": true,          "id": "string",          "value_id": "string"        }      ],      "model": "string",      "provider": "string",      "reasoning_effort": "string",      "speed": "normal"    },    "session_id": "string",    "skill_invocations": [      {        "command_id": "string",        "end": 0,        "name": "string",        "source": {          "id": "string",          "key": "string",          "kind": "string",          "origin": "string",          "scope": "string"        },        "start": 0,        "token": "string"      }    ],    "status": "queued",    "steer_delivery": "injected",    "target_turn_id": "string",    "text": "string"  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}/steer

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

queue_entry_id*string

Queue entry id

Request Body

JSON request body

application/json
  1. body
expected_turn_id?string
idempotency_key*string
message_id*string
text*string

Response Body

Queued input promoted to steering

application/json
  1. response
prompt*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/prompt/queue/string/steer" \  -H "Content-Type: application/json" \  -d '{    "idempotency_key": "string",    "message_id": "string",    "text": "string"  }'
{  "prompt": {    "canceled_queued_entries": 0,    "delivery": "string",    "disposition": "direct",    "entry_id": "string",    "estimated_send_at": "2019-08-24T14:15:22Z",    "goal": {      "outcome": "started",      "reason_code": "goal_not_active",      "replaced_run_id": "string",      "snapshot": {        "bound_session_id": "string",        "cause": "goal_not_active",        "context": {          "diagnostic": "string",          "nudge_ratio": 0.1,          "ratio": 0,          "reported_at": "2019-08-24T14:15:22Z",          "size": 0,          "state": "known",          "used": 0        },        "contract_summary": "string",        "last_verdict": {          "blocking_issues": [            {              "id": "string",              "note": "string"            }          ],          "evaluated_at": "2019-08-24T14:15:22Z",          "evidence_ref": "string",          "outcome": "approved"        },        "live": true,        "node_id": "string",        "objective": "string",        "origin_session_id": "string",        "pause_requested": true,        "run_id": "string",        "run_status": "queued",        "status": "active",        "turn_limit": 0,        "turns_used": 0      }    },    "idempotency_key": "string",    "message_id": "string",    "mode": "string",    "new_turn_id": "string",    "previous_turn_id": "string",    "queue_entry_id": "string",    "queue_generation": 0,    "queue_position": 0,    "replayed": true,    "reply_watch": {      "id": "string",      "state": "string"    },    "status": "string",    "steer_delivery": "injected",    "target_workspace_id": "string",    "turn_id": "string"  }}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/recap

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

limit?integer

Maximum recent messages to include

Formatint32

Response Body

OK

application/json
  1. response
recap*
curl -X GET "https://example.com/api/workspaces/string/sessions/string/recap"
{  "recap": {    "active_run": {      "attempt": 0,      "claim_token_hash": "string",      "claimed_at": "2019-08-24T14:15:22Z",      "claimed_by": {        "kind": "human",        "ref": "string"      },      "designation": {        "brief": "string",        "index": 0      },      "designation_group_id": "string",      "ended_at": "2019-08-24T14:15:22Z",      "error": "string",      "failure_kind": "string",      "heartbeat_at": "2019-08-24T14:15:22Z",      "id": "string",      "idempotency_key": "string",      "lease_until": "2019-08-24T14:15:22Z",      "metadata": null,      "origin": {        "kind": "cli",        "ref": "string"      },      "previous_run_id": "string",      "profile_color": "string",      "profile_icon": "string",      "profile_id": "string",      "profile_name": "string",      "queued_at": "2019-08-24T14:15:22Z",      "recovery_count": 0,      "resolved_worktree_mode": "none",      "resolved_worktree_ref": "string",      "result": null,      "result_bytes": 0,      "result_ref": "string",      "session_id": "string",      "started_at": "2019-08-24T14:15:22Z",      "status": "queued",      "task_id": "string",      "worktree_id": "string"    },    "pending_inputs": 0,    "pending_markers": 0,    "recent_markers": [      {        "diagnostic": null,        "evidence": {          "property1": null,          "property2": null        },        "kind": "string",        "occurred_at": "2019-08-24T14:15:22Z",        "summary": "string"      }    ],    "recent_messages": [      {        "id": "string",        "metadata": null,        "parts": [          {            "data": null,            "errorText": "string",            "filename": "string",            "id": "string",            "input": null,            "mediaType": "string",            "output": null,            "parentToolCallId": "string",            "preliminary": true,            "rawInput": null,            "state": "string",            "text": "string",            "title": "string",            "toolCallId": "string",            "toolName": "string",            "type": "string",            "url": "string"          }        ],        "role": "string"      }    ],    "session": {      "activity": {        "current_tool": "string",        "deadline_at": "2019-08-24T14:15:22Z",        "elapsed_ms": 0,        "elapsed_seconds": 0,        "idle_seconds": 0,        "iteration_current": 0,        "iteration_max": 0,        "last_activity_at": "2019-08-24T14:15:22Z",        "last_activity_detail": "string",        "last_activity_kind": "string",        "last_progress_at": "2019-08-24T14:15:22Z",        "tool_call_id": "string",        "turn_id": "string",        "turn_source": "string",        "turn_started_at": "2019-08-24T14:15:22Z"      },      "agent_name": "string",      "archived_at": "2019-08-24T14:15:22Z",      "attach_expires_at": "2019-08-24T14:15:22Z",      "attachable": true,      "attached_to": "string",      "attention": "string",      "attention_changed_at": "2019-08-24T14:15:22Z",      "available_commands": [        {          "description": "string",          "input": {            "hint": "string"          },          "name": "string"        }      ],      "badge": "running",      "board_column": "needs_you",      "branch": "string",      "busy_input": {        "default_mode": "string",        "steer_capability": "steer_ext",        "steer_delivery": "injected"      },      "children": {        "done": 0,        "in_review": 0,        "needs_you": 0,        "total": 0,        "working": 0      },      "created_at": "2019-08-24T14:15:22Z",      "derivation": {        "first_prompt": "string",        "kind": "",        "native_fork_error": "string",        "native_state": "string",        "seed": "string",        "source_session_id": "string"      },      "diagnostics": [        {          "category": "string",          "code": "string",          "data_freshness": "string",          "doc_url": "string",          "evidence": {            "property1": null,            "property2": null          },          "id": "string",          "message": "string",          "severity": "string",          "suggested_command": "string",          "title": "string"        }      ],      "effective_workspace_access": "string",      "escalated": true,      "failure": {        "crash_bundle_path": "string",        "kind": "string",        "reason_code": "string",        "summary": "string"      },      "folder_id": "string",      "health": {        "active_prompt": true,        "agent_name": "string",        "attachable": true,        "attention": "string",        "eligible_for_wake": true,        "escalated": true,        "health": "healthy",        "ineligibility_reason": "session_prompt_active",        "last_activity_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "last_presence_at": "2019-08-24T14:15:22Z",        "lifecycle_state": "starting",        "session_id": "string",        "state": "idle",        "updated_at": "2019-08-24T14:15:22Z",        "verified": true,        "workspace_id": "string"      },      "id": "string",      "lineage": {        "auto_stop_on_parent": true,        "kind": "",        "notify_creator": true,        "origin_agent_name": "string",        "origin_message_id": "string",        "parent_session_id": "string",        "permission_policy": {          "mcp_servers": [            "string"          ],          "skills": [            "string"          ],          "tools": [            "string"          ],          "workspace_paths": [            "string"          ]        },        "root_session_id": "string",        "spawn_budget": {          "max_active_per_workspace": 0,          "max_children": 0,          "max_depth": 0,          "ttl_seconds": 0        },        "spawn_depth": 0,        "spawn_role": "string",        "ttl_expires_at": "2019-08-24T14:15:22Z"      },      "monitor_summary": {        "active": 0      },      "name": "string",      "parent_title": "string",      "pending_interactions": [        {          "choices": [            "string"          ],          "created_at": "2019-08-24T14:15:22Z",          "decisions": [            "string"          ],          "interaction_id": "string",          "kind": "string",          "provider_request_id": "string",          "resolution": "string",          "resolved_at": "2019-08-24T14:15:22Z",          "resolved_by": "string",          "status": "string",          "title": "string",          "tool_id": "string",          "turn_id": "string"        }      ],      "profile_archived": true,      "profile_color": "string",      "profile_emoji": "string",      "profile_icon": "string",      "profile_id": "string",      "profile_name": "string",      "pull_request": {        "checks": {          "failed": 0,          "failed_names": [            "string"          ],          "passed": 0,          "pending": 0,          "state": "passing"        },        "draft": true,        "head_sha": "string",        "mergeable": "mergeable",        "number": 0,        "provider": "string",        "ready_to_merge": true,        "review_decision": "approved",        "state": "open",        "url": "string"      },      "pull_request_lookup": {        "cause": "string",        "observed_at": "2019-08-24T14:15:22Z",        "stale": true,        "state": "ok"      },      "queue": {        "cap": 0,        "entries": 0      },      "reply_watches": [        {          "created_at": "2019-08-24T14:15:22Z",          "id": "string",          "message_id": "string",          "state": "string",          "target_session_id": "string"        }      ],      "runtime": {        "acp_caps": {          "config_options": [            {              "category": "string",              "current_bool": true,              "current_value_id": "string",              "description": "string",              "id": "string",              "kind": "string",              "label": "string",              "values": [                {                  "description": "string",                  "group_id": "string",                  "group_label": "string",                  "label": "string",                  "value": "string"                }              ]            }          ],          "prompt_audio": true,          "prompt_embedded_context": true,          "prompt_image": true,          "supported_modes": [            "string"          ],          "supports_fork_session": true,          "supports_load_session": true,          "supports_resume_session": true        },        "acp_session_id": "string",        "effective": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal",          "speed_resolution": {            "reason": "capability_absent",            "requested": "normal",            "status": "applied"          }        },        "failure": "string",        "generation": 0,        "last_known": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal",          "speed_resolution": {            "reason": "capability_absent",            "requested": "normal",            "status": "applied"          }        },        "recovery": {          "attempt": 0,          "generation": 0,          "last_attempt_at": "2019-08-24T14:15:22Z",          "last_error": "string",          "max_attempts": 0,          "next_attempt_at": "2019-08-24T14:15:22Z",          "started_at": "2019-08-24T14:15:22Z"        },        "requested": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal"        },        "selected": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal"        },        "selection_revision": 0,        "status": "string",        "transition": "string"      },      "scope": "string",      "state": "starting",      "stop_cause": "string",      "stop_detail": "string",      "stop_reason": "completed",      "subagent_summary": {        "attention": 0,        "failed": 0,        "live": 0,        "most_urgent": "string",        "total": 0      },      "supervision": {        "quiet_warning": {          "quiet_since": "2019-08-24T14:15:22Z",          "stop_at": "2019-08-24T14:15:22Z",          "warned_at": "2019-08-24T14:15:22Z"        },        "sources": [          {            "error": "string",            "kind": "agent_progress",            "ref": "string",            "state": "string"          }        ],        "work_signals": [          {            "kind": "agent_progress",            "ref": "string",            "since": "2019-08-24T14:15:22Z"          }        ]      },      "transcript_epoch": 0,      "type": "user",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "waiting_on": "sessions",      "workspace_id": "string",      "workspace_path": "string",      "worktree_binding": {        "available": true,        "unavailable_reason": "string"      },      "worktree_id": "string"    },    "snapshot": {      "consistency": "string",      "event_cursor": 0,      "generated_at": "2019-08-24T14:15:22Z",      "queue_generation": 0,      "transcript_cursor": 0    }  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/repair

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

dry_run?boolean

Report planned repairs without persisting new events

force?boolean

Allow repair for stopped sessions whose stop reason is not crash or error

Response Body

OK

application/json
  1. response
repair*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/repair"
{  "repair": {    "actions": [      {        "code": "string",        "event_id": "string",        "persisted": true,        "tool_call_id": "string",        "tool_name": "string",        "turn_id": "string"      }    ],    "issues": [      {        "code": "string",        "detail": "string",        "event_id": "string",        "severity": "string",        "turn_id": "string"      }    ],    "persisted": true,    "session_id": "string"  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/rewind

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
expected_epoch*|
Formatint64
expected_generation*|
Formatint64
expected_max_sequence*|
Formatint64
idempotency_key*string
message_id*string

Response Body

OK

application/json
  1. response
rewind*
session*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/rewind" \  -H "Content-Type: application/json" \  -d '{    "expected_epoch": 0,    "expected_generation": 0,    "expected_max_sequence": 0,    "idempotency_key": "string",    "message_id": "string"  }'
{  "rewind": {    "archived_event_count": 0,    "archived_from_sequence": 0,    "archived_through_sequence": 0,    "draft_text": "string",    "generation": 0,    "max_sequence": 0,    "replayed": true,    "target_message_id": "string",    "transcript_epoch": 0  },  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
DELETE
/api/workspaces/{workspace_id}/sessions/{session_id}/runtime

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

expected_revision*integer

Current runtime selection revision

Formatint64

Response Body

OK

application/json
  1. response
session*
curl -X DELETE "https://example.com/api/workspaces/string/sessions/string/runtime?expected_revision=0"
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
PUT
/api/workspaces/{workspace_id}/sessions/{session_id}/runtime

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

JSON request body

application/json
  1. body
expected_revision*|
Formatint64
runtime*

Response Body

OK

application/json
  1. response
session*
curl -X PUT "https://example.com/api/workspaces/string/sessions/string/runtime" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 0,    "runtime": {      "provider": "string"    }  }'
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/soul/refresh

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

JSON request body

application/json
  1. body
expected_digest*string
idempotency_key?string

Response Body

OK

application/json
  1. response
active*boolean
agent_name?string
body?string
config_provenance*
created_at?|
Formatdate-time
diagnostics?array<>
digest?string
enabled*boolean
frontmatter*
limits*
present*boolean
revision_id?string
snapshot_id?string
source_path?string
truncated?boolean
valid*boolean
validation_status*string
Value in"missing""inactive""valid""invalid"
curl -X POST "https://example.com/api/workspaces/string/sessions/string/soul/refresh" \  -H "Content-Type: application/json" \  -d '{    "expected_digest": "string"  }'
{  "active": true,  "agent_name": "string",  "body": "string",  "config_provenance": {    "context_projection_bytes": 0,    "digest": "string",    "enabled": true,    "max_body_bytes": 0,    "source": "string"  },  "created_at": "2019-08-24T14:15:22Z",  "diagnostics": [    {      "code": "string",      "column": 0,      "field": "string",      "line": 0,      "message": "string",      "owner_surface": "string",      "section": "string",      "severity": "info",      "source_path": "string"    }  ],  "digest": "string",  "enabled": true,  "frontmatter": {    "collaboration": [      "string"    ],    "constraints": [      "string"    ],    "principles": [      "string"    ],    "role": "string",    "tags": [      "string"    ],    "tone": [      "string"    ],    "version": "string"  },  "limits": {    "context_projection_bytes": 0,    "max_body_bytes": 0,    "max_bytes": 0  },  "present": true,  "revision_id": "string",  "snapshot_id": "string",  "source_path": "string",  "truncated": true,  "valid": true,  "validation_status": "missing"}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/steer

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

JSON request body

application/json
  1. body
attachments?array<>
expected_turn_id?string
idempotency_key*string
message_id*string
text*string

Response Body

Prompt steering accepted

application/json
  1. response
prompt*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/steer" \  -H "Content-Type: application/json" \  -d '{    "idempotency_key": "string",    "message_id": "string",    "text": "string"  }'
{  "prompt": {    "canceled_queued_entries": 0,    "delivery": "string",    "disposition": "direct",    "entry_id": "string",    "estimated_send_at": "2019-08-24T14:15:22Z",    "goal": {      "outcome": "started",      "reason_code": "goal_not_active",      "replaced_run_id": "string",      "snapshot": {        "bound_session_id": "string",        "cause": "goal_not_active",        "context": {          "diagnostic": "string",          "nudge_ratio": 0.1,          "ratio": 0,          "reported_at": "2019-08-24T14:15:22Z",          "size": 0,          "state": "known",          "used": 0        },        "contract_summary": "string",        "last_verdict": {          "blocking_issues": [            {              "id": "string",              "note": "string"            }          ],          "evaluated_at": "2019-08-24T14:15:22Z",          "evidence_ref": "string",          "outcome": "approved"        },        "live": true,        "node_id": "string",        "objective": "string",        "origin_session_id": "string",        "pause_requested": true,        "run_id": "string",        "run_status": "queued",        "status": "active",        "turn_limit": 0,        "turns_used": 0      }    },    "idempotency_key": "string",    "message_id": "string",    "mode": "string",    "new_turn_id": "string",    "previous_turn_id": "string",    "queue_entry_id": "string",    "queue_generation": 0,    "queue_position": 0,    "replayed": true,    "reply_watch": {      "id": "string",      "state": "string"    },    "status": "string",    "steer_delivery": "injected",    "target_workspace_id": "string",    "turn_id": "string"  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/stop

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
wait?boolean|null

Response Body

Settled stop result or already stopped

application/json
  1. response
attention?string
escalated*boolean
phase?string
session_id*string
state*string
Value in"starting""active""stopping""stopped"
status*string
stop_cause?string
stopped_after?string
verified*boolean
curl -X POST "https://example.com/api/workspaces/string/sessions/string/stop" \  -H "Content-Type: application/json" \  -d '{}'
{  "attention": "string",  "escalated": true,  "phase": "string",  "session_id": "string",  "state": "starting",  "status": "string",  "stop_cause": "string",  "stopped_after": "string",  "verified": true}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/subagents

Path Parameters

workspace_id*string

Workspace id

session_id*string

Parent session id

Query Parameters

origin?string

Subagent origin

Value in"delegated""provider_native"
status?string

Comma-separated subagent statuses

limit?integer

Subagents per page (default 50, maximum 200)

Formatint32
cursor?string

Opaque next_cursor from the previous page

order?string

Row order: newest first (default), or most urgent first (waiting, failed, working, queued, settled) then newest

Value in"newest""urgency"

Response Body

Success

application/json
  1. response
next_cursor*string|null
subagents*array<>
curl -X GET "https://example.com/api/workspaces/string/sessions/string/subagents"
{  "next_cursor": "string",  "subagents": [    {      "child_activity": "working",      "child_session_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "delivery": "string",      "depth": 0,      "error": "string",      "hint": "string",      "isolation": "string",      "origin": "string",      "parent_session_id": "string",      "parent_turn_id": "string",      "progress": "string",      "provider_tool_call_id": "string",      "result": "string",      "result_preview": "string",      "result_truncated": true,      "role": "string",      "runtime": {        "agent": "string",        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "string"      },      "settled_at": "2019-08-24T14:15:22Z",      "started_at": "2019-08-24T14:15:22Z",      "status": "string",      "subagent_id": "string",      "title": "string",      "updated_at": "2019-08-24T14:15:22Z",      "wait_timed_out": true,      "work_state": "string",      "workspace_id": "string",      "worktree": {        "base_ref": "string",        "base_sha": "string",        "branch": "string",        "commits_ahead": 0,        "dirty_files": 0,        "head_sha": "string",        "id": "string",        "name": "string",        "observed_at": "2019-08-24T14:15:22Z",        "path": "string",        "pull_request": {          "number": 0,          "state": "string",          "url": "string"        },        "pull_request_status": "string"      }    }  ]}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/tools

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

agent_name?string

Effective agent name

Response Body

OK

application/json
  1. response
tools*array<>
curl -X GET "https://example.com/api/workspaces/string/sessions/string/tools"
{  "tools": [    {      "availability": {        "authorized": true,        "available": true,        "conflicted": true,        "enabled": true,        "executable": true,        "reason_codes": [          "approval_canceled"        ],        "registered": true      },      "decision": {        "agent_policy_result": "string",        "approval_required": true,        "availability_result": "string",        "callable": true,        "hook_result": "string",        "reason_codes": [          "approval_canceled"        ],        "registry_policy_result": "string",        "session_policy_result": "string",        "source_policy_result": "string",        "system_permission_mode": "string",        "visible_to_operator": true,        "visible_to_session": true      },      "descriptor": {        "backend": {          "extension_id": "string",          "handler": "string",          "kind": "native_go",          "mcp_server": "string",          "mcp_tool": "string",          "native_name": "string",          "requires_capabilities": [            "string"          ]        },        "concurrency_safe": true,        "description": "string",        "destructive": true,        "display_title": "string",        "friendly_verb": "string",        "input_schema": null,        "input_schema_digest": "string",        "max_result_bytes": 0,        "open_world": true,        "output_schema": null,        "output_schema_digest": "string",        "preview": "string",        "read_only": true,        "requires_interaction": true,        "risk": "read",        "search_hints": [          "string"        ],        "source": {          "kind": "builtin",          "owner": "string",          "raw_server_name": "string",          "raw_tool_name": "string",          "resource_id": "string",          "resource_version": "string",          "scope": "string",          "workspace_id": "string"        },        "tags": [          "string"        ],        "tool_id": "string",        "toolsets": [          "string"        ],        "visibility": "internal"      }    }  ]}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/tools/search

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

JSON request body

application/json
  1. body
agent_name?string
limit?integer
query*string
session_id?string
workspace_id?string

Response Body

OK

application/json
  1. response
tools*array<>
curl -X POST "https://example.com/api/workspaces/string/sessions/string/tools/search" \  -H "Content-Type: application/json" \  -d '{    "query": "string"  }'
{  "tools": [    {      "availability": {        "authorized": true,        "available": true,        "conflicted": true,        "enabled": true,        "executable": true,        "reason_codes": [          "approval_canceled"        ],        "registered": true      },      "decision": {        "agent_policy_result": "string",        "approval_required": true,        "availability_result": "string",        "callable": true,        "hook_result": "string",        "reason_codes": [          "approval_canceled"        ],        "registry_policy_result": "string",        "session_policy_result": "string",        "source_policy_result": "string",        "system_permission_mode": "string",        "visible_to_operator": true,        "visible_to_session": true      },      "descriptor": {        "backend": {          "extension_id": "string",          "handler": "string",          "kind": "native_go",          "mcp_server": "string",          "mcp_tool": "string",          "native_name": "string",          "requires_capabilities": [            "string"          ]        },        "concurrency_safe": true,        "description": "string",        "destructive": true,        "display_title": "string",        "friendly_verb": "string",        "input_schema": null,        "input_schema_digest": "string",        "max_result_bytes": 0,        "open_world": true,        "output_schema": null,        "output_schema_digest": "string",        "preview": "string",        "read_only": true,        "requires_interaction": true,        "risk": "read",        "search_hints": [          "string"        ],        "source": {          "kind": "builtin",          "owner": "string",          "raw_server_name": "string",          "raw_tool_name": "string",          "resource_id": "string",          "resource_version": "string",          "scope": "string",          "workspace_id": "string"        },        "tags": [          "string"        ],        "tool_id": "string",        "toolsets": [          "string"        ],        "visibility": "internal"      }    }  ]}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/unarchive

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

profile?string

Act as this profile by name

Response Body

OK

application/json
  1. response
session*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/unarchive"
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/usage

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Response Body

OK

application/json
  1. response
usage*
curl -X GET "https://example.com/api/workspaces/string/sessions/string/usage"
{  "usage": {    "cache_read_tokens": 0,    "cache_write_tokens": 0,    "context": {      "cleared_by": {        "compaction_id": "string",        "sequence": 0      },      "injected": {        "estimate": "string",        "rows": [          {            "bytes": 0,            "delivered_turn_id": "string",            "delivery": "string",            "delivery_sequence": 0,            "hook_modified": true,            "key": "string",            "kind": "string",            "label": "string",            "last_seen_turn_id": "string",            "name": "string",            "owner_kind": "string",            "sent_at": "2019-08-24T14:15:22Z",            "stale": true,            "tokens": 0,            "unchanged": true          }        ],        "stale": true,        "tokens": 0      },      "ratio": 0,      "reported_at": "2019-08-24T14:15:22Z",      "reported_turn_id": "string",      "sequence": 0,      "size": 0,      "size_source": "string",      "stale": true,      "state": "reported",      "used": 0    },    "cost_currency": "string",    "cost_source": "agent_reported",    "cost_status": "actual",    "input_tokens": 0,    "output_tokens": 0,    "total_cost": 0,    "total_tokens": 0,    "turn_count": 0,    "work_time": {      "active_duration_ms": 0,      "last_completed_turn_id": "string",      "turn_count": 0    }  }}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/usage/turns

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Response Body

OK

application/json
  1. response
compactions*array<>
turns*array<>
curl -X GET "https://example.com/api/workspaces/string/sessions/string/usage/turns"
{  "compactions": [    {      "at": "2019-08-24T14:15:22Z",      "compaction_id": "string",      "context_after": {        "sequence": 0,        "size": 0,        "used": 0      },      "context_size": 0,      "context_used": 0,      "sequence": 0,      "status": "string",      "trigger": "string",      "turn_id": "string"    }  ],  "turns": [    {      "injected": {        "estimate": "string",        "sent_at": "2019-08-24T14:15:22Z",        "sequence": 0,        "spans": [          {            "bytes": 0,            "delivery": "string",            "hook_modified": true,            "key": "string",            "kind": "string",            "name": "string",            "startup_dedup": true,            "tokens": 0,            "unchanged": true          }        ],        "tokens": 0      },      "sequence": 0,      "turn_id": "string",      "usage": {        "cache_read_tokens": 0,        "cache_write_tokens": 0,        "context_size": 0,        "context_used": 0,        "cost_amount": 0,        "cost_currency": "string",        "input_tokens": 0,        "meta": {          "property1": null,          "property2": null        },        "output_tokens": 0,        "sequence": 0,        "thought_tokens": 0,        "timestamp": "2019-08-24T14:15:22Z",        "total_tokens": 0,        "turn_id": "string"      }    }  ]}

Wait for a session state

POST
/api/workspaces/{workspace_id}/sessions/{session_id}/wait

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

JSON request body

application/json
  1. body
epoch?integer
Formatint64
resume_id?string
timeout_ms*integer
Formatint64
until?array<string>

Response Body

Wait completed or timed out

application/json
  1. response
outcome*string
resume_id?string
revision*integer
Formatint64
session_id*string
state?string
until?array<string>
waited_ms*integer
Formatint64
curl -X POST "https://example.com/api/workspaces/string/sessions/string/wait" \  -H "Content-Type: application/json" \  -d '{    "timeout_ms": 0  }'
{  "outcome": "string",  "resume_id": "string",  "revision": 0,  "session_id": "string",  "state": "string",  "until": [    "string"  ],  "waited_ms": 0}
DELETE
/api/workspaces/{workspace_id}/sessions/{session_id}/worktree

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

profile?string

Act as this profile by name

expected_worktree_id?string

Expected current worktree id; empty for workspace root

Response Body

Same session with updated execution location

application/json
  1. response
session*
curl -X DELETE "https://example.com/api/workspaces/string/sessions/string/worktree"
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
PUT
/api/workspaces/{workspace_id}/sessions/{session_id}/worktree

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
expected_worktree_id?string|null
worktree*string

Response Body

Same session with updated execution location

application/json
  1. response
session*
curl -X PUT "https://example.com/api/workspaces/string/sessions/string/worktree" \  -H "Content-Type: application/json" \  -d '{    "worktree": "string"  }'
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/worktree-fork

Path Parameters

workspace_id*string

Workspace id

session_id*string

Origin session id

Request Body

JSON request body

application/json
  1. body
confirmed*boolean
new_worktree?|
worktree?string

Response Body

Created

application/json
  1. response
session*
curl -X POST "https://example.com/api/workspaces/string/sessions/string/worktree-fork" \  -H "Content-Type: application/json" \  -d '{    "confirmed": true  }'
{  "session": {    "activity": {      "current_tool": "string",      "deadline_at": "2019-08-24T14:15:22Z",      "elapsed_ms": 0,      "elapsed_seconds": 0,      "idle_seconds": 0,      "iteration_current": 0,      "iteration_max": 0,      "last_activity_at": "2019-08-24T14:15:22Z",      "last_activity_detail": "string",      "last_activity_kind": "string",      "last_progress_at": "2019-08-24T14:15:22Z",      "tool_call_id": "string",      "turn_id": "string",      "turn_source": "string",      "turn_started_at": "2019-08-24T14:15:22Z"    },    "agent_name": "string",    "archived_at": "2019-08-24T14:15:22Z",    "attach_expires_at": "2019-08-24T14:15:22Z",    "attachable": true,    "attached_to": "string",    "attention": "string",    "attention_changed_at": "2019-08-24T14:15:22Z",    "available_commands": [      {        "description": "string",        "input": {          "hint": "string"        },        "name": "string"      }    ],    "badge": "running",    "board_column": "needs_you",    "branch": "string",    "busy_input": {      "default_mode": "string",      "steer_capability": "steer_ext",      "steer_delivery": "injected"    },    "children": {      "done": 0,      "in_review": 0,      "needs_you": 0,      "total": 0,      "working": 0    },    "created_at": "2019-08-24T14:15:22Z",    "derivation": {      "first_prompt": "string",      "kind": "",      "native_fork_error": "string",      "native_state": "string",      "seed": "string",      "source_session_id": "string"    },    "diagnostics": [      {        "category": "string",        "code": "string",        "data_freshness": "string",        "doc_url": "string",        "evidence": {          "property1": null,          "property2": null        },        "id": "string",        "message": "string",        "severity": "string",        "suggested_command": "string",        "title": "string"      }    ],    "effective_workspace_access": "string",    "escalated": true,    "failure": {      "crash_bundle_path": "string",      "kind": "string",      "reason_code": "string",      "summary": "string"    },    "folder_id": "string",    "health": {      "active_prompt": true,      "agent_name": "string",      "attachable": true,      "attention": "string",      "eligible_for_wake": true,      "escalated": true,      "health": "healthy",      "ineligibility_reason": "session_prompt_active",      "last_activity_at": "2019-08-24T14:15:22Z",      "last_error": "string",      "last_presence_at": "2019-08-24T14:15:22Z",      "lifecycle_state": "starting",      "session_id": "string",      "state": "idle",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "workspace_id": "string"    },    "id": "string",    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "monitor_summary": {      "active": 0    },    "name": "string",    "parent_title": "string",    "pending_interactions": [      {        "choices": [          "string"        ],        "created_at": "2019-08-24T14:15:22Z",        "decisions": [          "string"        ],        "interaction_id": "string",        "kind": "string",        "provider_request_id": "string",        "resolution": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "resolved_by": "string",        "status": "string",        "title": "string",        "tool_id": "string",        "turn_id": "string"      }    ],    "profile_archived": true,    "profile_color": "string",    "profile_emoji": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "pull_request": {      "checks": {        "failed": 0,        "failed_names": [          "string"        ],        "passed": 0,        "pending": 0,        "state": "passing"      },      "draft": true,      "head_sha": "string",      "mergeable": "mergeable",      "number": 0,      "provider": "string",      "ready_to_merge": true,      "review_decision": "approved",      "state": "open",      "url": "string"    },    "pull_request_lookup": {      "cause": "string",      "observed_at": "2019-08-24T14:15:22Z",      "stale": true,      "state": "ok"    },    "queue": {      "cap": 0,      "entries": 0    },    "reply_watches": [      {        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "message_id": "string",        "state": "string",        "target_session_id": "string"      }    ],    "runtime": {      "acp_caps": {        "config_options": [          {            "category": "string",            "current_bool": true,            "current_value_id": "string",            "description": "string",            "id": "string",            "kind": "string",            "label": "string",            "values": [              {                "description": "string",                "group_id": "string",                "group_label": "string",                "label": "string",                "value": "string"              }            ]          }        ],        "prompt_audio": true,        "prompt_embedded_context": true,        "prompt_image": true,        "supported_modes": [          "string"        ],        "supports_fork_session": true,        "supports_load_session": true,        "supports_resume_session": true      },      "acp_session_id": "string",      "effective": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "failure": "string",      "generation": 0,      "last_known": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal",        "speed_resolution": {          "reason": "capability_absent",          "requested": "normal",          "status": "applied"        }      },      "recovery": {        "attempt": 0,        "generation": 0,        "last_attempt_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "max_attempts": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "started_at": "2019-08-24T14:15:22Z"      },      "requested": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selected": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning_effort": "string",        "speed": "normal"      },      "selection_revision": 0,      "status": "string",      "transition": "string"    },    "scope": "string",    "state": "starting",    "stop_cause": "string",    "stop_detail": "string",    "stop_reason": "completed",    "subagent_summary": {      "attention": 0,      "failed": 0,      "live": 0,      "most_urgent": "string",      "total": 0    },    "supervision": {      "quiet_warning": {        "quiet_since": "2019-08-24T14:15:22Z",        "stop_at": "2019-08-24T14:15:22Z",        "warned_at": "2019-08-24T14:15:22Z"      },      "sources": [        {          "error": "string",          "kind": "agent_progress",          "ref": "string",          "state": "string"        }      ],      "work_signals": [        {          "kind": "agent_progress",          "ref": "string",          "since": "2019-08-24T14:15:22Z"        }      ]    },    "transcript_epoch": 0,    "type": "user",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "waiting_on": "sessions",    "workspace_id": "string",    "workspace_path": "string",    "worktree_binding": {      "available": true,      "unavailable_reason": "string"    },    "worktree_id": "string"  }}

Read one subagent

GET
/api/workspaces/{workspace_id}/subagents/{subagent_id}

Path Parameters

workspace_id*string

Workspace id

subagent_id*string

Subagent id

Response Body

Success

application/json
  1. response
child_activity?string
Value in"working""idle""stopped"
child_session_id*string|null
created_at*string
Formatdate-time
delivery*string
depth*integer
error*string|null
hint?string
isolation*string
origin*string
parent_session_id*string
parent_turn_id*string
progress*string
provider_tool_call_id*string|null
result*string|null
result_preview*string
result_truncated*boolean
role*string
runtime*
settled_at*|
Formatdate-time
started_at*|
Formatdate-time
status*string
subagent_id*string
title*string
updated_at*string
Formatdate-time
wait_timed_out*boolean
work_state*string
workspace_id*string
worktree?|
curl -X GET "https://example.com/api/workspaces/string/subagents/string"
{  "child_activity": "working",  "child_session_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "delivery": "string",  "depth": 0,  "error": "string",  "hint": "string",  "isolation": "string",  "origin": "string",  "parent_session_id": "string",  "parent_turn_id": "string",  "progress": "string",  "provider_tool_call_id": "string",  "result": "string",  "result_preview": "string",  "result_truncated": true,  "role": "string",  "runtime": {    "agent": "string",    "model": "string",    "provider": "string",    "reasoning_effort": "string",    "speed": "string"  },  "settled_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "status": "string",  "subagent_id": "string",  "title": "string",  "updated_at": "2019-08-24T14:15:22Z",  "wait_timed_out": true,  "work_state": "string",  "workspace_id": "string",  "worktree": {    "base_ref": "string",    "base_sha": "string",    "branch": "string",    "commits_ahead": 0,    "dirty_files": 0,    "head_sha": "string",    "id": "string",    "name": "string",    "observed_at": "2019-08-24T14:15:22Z",    "path": "string",    "pull_request": {      "number": 0,      "state": "string",      "url": "string"    },    "pull_request_status": "string"  }}
POST
/api/workspaces/{workspace_id}/subagents/{subagent_id}/cancel

Path Parameters

workspace_id*string

Workspace id

subagent_id*string

Subagent id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
reason*string

Response Body

Success

application/json
  1. response
status*string
subagent_id*string
curl -X POST "https://example.com/api/workspaces/string/subagents/string/cancel" \  -H "Content-Type: application/json" \  -d '{    "reason": "string"  }'
{  "status": "string",  "subagent_id": "string"}