Run task thread

POST/v1/tasks/{taskId}/run-thread

Create a new thread for a task, link it back to the task, execute the task prompt synchronously, and optionally move the task into in_progress.

How to call this endpoint

Every ACP API request uses bearer authentication. The examples here show the actual request path, auth header, and body shape that the platform expects.

Path, query, and header parameters

These parameters control which ACP object the endpoint acts on and how the request is processed.

Path parameters
NameLocationTypeRequiredDescription
taskIdpathstringYesTask ID
Query parameters
None.

Body schema

Content type: application/json · Optional

FieldTypeRequiredDescription
environmentIdstringNoComputer ID.
agentIdstringNoAgent ID.
moveToInProgressbooleanNo
metadataobjectNoFree-form metadata object.
messagestringNoOptional execution message. Defaults to the task prompt.
contentstringNoBackwards-compatible alias for message.
taskstringNoBackwards-compatible alias for message.

What the API returns

Each response code below includes the documented payload shape for the ACP API.

201Task thread created and executedapplication/json
FieldTypeRequiredDescription
threadobjectNo
thread.idstringNoUnique identifier.
thread.projectIdstringNoProject ID.
thread.environmentIdstringNoComputer ID.
thread.agentIdstringNoAgent ID.
thread.titlestringNoDisplay title.
thread.taskstringNo
thread.appIdstringNo
thread.statusactive | running | completed | failed | cancelledNoCurrent lifecycle status.
thread.messageCountintegerNo
thread.lastMessageAtstringNo
thread.lastMessagePreviewstringNo
thread.inputTokensintegerNo
thread.outputTokensintegerNo
thread.totalCostnumberNo
thread.environmentMinutesnumberNo
thread.metadataobjectNoFree-form metadata object.
thread.teamExecutionobjectNo
thread.teamExecution.modeteamNo
thread.teamExecution.teamAgentIdstringNo
thread.teamExecution.teamAgentNamestringNo
thread.teamExecution.orchestratorobjectNo
thread.teamExecution.orchestrator.agentIdstringNoAgent ID.
thread.teamExecution.orchestrator.agentNamestringNo
thread.teamExecution.orchestrator.claudeAgentNamestringNo
thread.teamExecution.subagentsobject[]No
thread.teamExecution.subagents[].agentIdstringNoAgent ID.
thread.teamExecution.subagents[].agentNamestringNo
thread.teamExecution.subagents[].claudeAgentNamestringNo
thread.subagentActivityobject[]No
thread.subagentActivity[].agentIdstringNoAgent ID.
thread.subagentActivity[].agentNamestringNo
thread.subagentActivity[].claudeAgentNamestringNo
thread.subagentActivity[].eventCountintegerNo
thread.subagentActivity[].lastActiveAtstringNo
thread.subagentActivity[].teamAgentIdstringNo
thread.subagentActivity[].teamAgentNamestringNo
thread.environmentNamestringNo
thread.agentNamestringNo
thread.createdAtstringNoISO 8601 timestamp.
thread.updatedAtstringNoISO 8601 timestamp.
taskobjectNo
task.idstringNoUnique identifier.
task.userIdstringNoUser ID.
task.projectIdstringNoProject ID.
task.releaseIdstringNo
task.titlestringNoDisplay title.
task.descriptionstringNoHuman-readable description.
task.statusbacklog | todo | in_progress | blocked | in_review | doneNoCurrent lifecycle status.
task.prioritylow | medium | high | urgentNo
task.sprintIdstringNo
task.assigneeAgentIdstringNo
task.dependencyIdsstring[]No
task.linkedThreadIdsstring[]No
task.lastStartedThreadIdstringNo
task.scheduledStartAtstringNo
task.scheduledEndAtstringNo
task.dueAtstringNo
task.completedAtstringNoISO 8601 timestamp.
task.sortOrdernumberNo
task.metadataobjectNoFree-form metadata object.
task.createdAtstringNoISO 8601 timestamp.
task.updatedAtstringNoISO 8601 timestamp.
subtasksobject[]No
subtasks[].idstringNoUnique identifier.
subtasks[].titlestringNoDisplay title.
subtasks[].descriptionstringNoHuman-readable description.
subtasks[].statusbacklog | todo | in_progress | blocked | in_review | doneNoCurrent lifecycle status.
subtasks[].prioritylow | medium | high | urgentNo
subtasks[].typetask | subtaskNo
subtasks[].parentTaskIdstringNo
subtasks[].assigneeAgentIdstringNo
subtasks[].dependencyIdsstring[]No
subtasks[].linkedThreadIdsstring[]No
subtasks[].lastStartedThreadIdstringNo
subtasks[].scheduledStartAtstringNo
subtasks[].scheduledEndAtstringNo
subtasks[].dueAtstringNo
subtasks[].reviewRequiredbooleanNo
subtasks[].reviewerActorIdstringNo
subtasks[].reviewerActorKindstringNo
subtasks[].reviewerNamestringNo
executionobjectNo
execution.successbooleanNoWhether the request succeeded.
execution.responsestringNo
execution.actionsstring[]No
execution.durationMsnumberNo
execution.usageobjectNo
execution.usage.inputTokensnumberNo
execution.usage.outputTokensnumberNo
execution.errorstringNo
402Insufficient budget
None.
409Task is blocked by incomplete dependencies
None.
Run task thread
Loading...
Response 201
Loading...
See the ACP quickstart and SDK flow