Fork thread from message boundary
POST
/v1/threads/{threadId}/fork-from-messageCreate a new branch from the historical state immediately before a selected user message.
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
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| threadId | path | string | Yes | Thread ID |
Query parameters
None.
Body schema
Content type: application/json · Required
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | No | Display title. |
| truncateAtMessageIndex | integer | No | — |
| environmentTarget | existing_environment | new_forked_environment | No | — |
| targetEnvironmentId | string | No | — |
| fileCopyMode | string | No | — |
What the API returns
Each response code below includes the documented payload shape for the ACP API.
201Thread forked from historical message boundaryapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| thread | object | No | — |
| thread.id | string | No | Unique identifier. |
| thread.projectId | string | No | Project ID. |
| thread.environmentId | string | No | Computer ID. |
| thread.agentId | string | No | Agent ID. |
| thread.title | string | No | Display title. |
| thread.task | string | No | — |
| thread.appId | string | No | — |
| thread.status | active | running | completed | failed | cancelled | No | Current lifecycle status. |
| thread.messageCount | integer | No | — |
| thread.lastMessageAt | string | No | — |
| thread.lastMessagePreview | string | No | — |
| thread.inputTokens | integer | No | — |
| thread.outputTokens | integer | No | — |
| thread.totalCost | number | No | — |
| thread.environmentMinutes | number | No | — |
| thread.metadata | object | No | Free-form metadata object. |
| thread.teamExecution | object | No | — |
| thread.teamExecution.mode | team | No | — |
| thread.teamExecution.teamAgentId | string | No | — |
| thread.teamExecution.teamAgentName | string | No | — |
| thread.teamExecution.orchestrator | object | No | — |
| thread.teamExecution.orchestrator.agentId | string | No | Agent ID. |
| thread.teamExecution.orchestrator.agentName | string | No | — |
| thread.teamExecution.orchestrator.claudeAgentName | string | No | — |
| thread.teamExecution.subagents | object[] | No | — |
| thread.teamExecution.subagents[].agentId | string | No | Agent ID. |
| thread.teamExecution.subagents[].agentName | string | No | — |
| thread.teamExecution.subagents[].claudeAgentName | string | No | — |
| thread.subagentActivity | object[] | No | — |
| thread.subagentActivity[].agentId | string | No | Agent ID. |
| thread.subagentActivity[].agentName | string | No | — |
| thread.subagentActivity[].claudeAgentName | string | No | — |
| thread.subagentActivity[].eventCount | integer | No | — |
| thread.subagentActivity[].lastActiveAt | string | No | — |
| thread.subagentActivity[].teamAgentId | string | No | — |
| thread.subagentActivity[].teamAgentName | string | No | — |
| thread.environmentName | string | No | — |
| thread.agentName | string | No | — |
| thread.createdAt | string | No | ISO 8601 timestamp. |
| thread.updatedAt | string | No | ISO 8601 timestamp. |
| environmentId | string | No | Computer ID. |
| environmentName | string | No | — |
| snapshotId | string | No | Snapshot ID. |
| messagesCopied | integer | No | — |
| forkMode | string | No | — |
Fork thread from message boundary
Loading...
Response 201
Loading...