API

LocalThreadOperation

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/local_threads/{local_thread_id}/operations create Authorized local coding-agent thread
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/local_threads/{local_thread_id}/operations/{operation_id} load Authorized local coding-agent thread
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/local_threads/operations/{operation_id} load Authorized native session adoption receipt

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

local_thread_operation, err := client.LocalThreadOperation(nil).Load(map[string]any{"agent_id": "example", "id": "example_id", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(local_thread_operation)
created, err := client.LocalThreadOperation(nil).Create(map[string]any{"agent_id": "example", "local_thread_id": "example", "organization_id": "example", "action": "example", "arguments": map[string]any{}, "key": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local local_thread_operation, err = client:LocalThreadOperation():load({ agent_id = "example", id = "example_id", organization_id = "example" })
local created, err = client:LocalThreadOperation():create({ agent_id = "example", local_thread_id = "example", organization_id = "example", action = "example", arguments = {}, key = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$local_thread_operation = $client->LocalThreadOperation()->load(["agent_id" => "example", "id" => "example_id", "organization_id" => "example"]);
$created = $client->LocalThreadOperation()->create(["agent_id" => "example", "local_thread_id" => "example", "organization_id" => "example", "action" => "example", "arguments" => [], "key" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

local_thread_operation = client.LocalThreadOperation().load({"agent_id": "example", "id": "example_id", "organization_id": "example"})
created = client.LocalThreadOperation().create({ "agent_id": "example", "local_thread_id": "example", "organization_id": "example", "action": "example", "arguments": {}, "key": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

local_thread_operation = client.LocalThreadOperation.load({ "agent_id" => "example", "id" => "example_id", "organization_id" => "example" })
created = client.LocalThreadOperation.create({ "agent_id" => "example", "local_thread_id" => "example", "organization_id" => "example", "action" => "example", "arguments" => {}, "key" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const local_thread_operation = await client.LocalThreadOperation().load({ agent_id: "example", id: "example_id", organization_id: "example" })
const created = await client.LocalThreadOperation().create({ agent_id: "example", local_thread_id: "example", organization_id: "example", action: "example", arguments: {}, key: "example" })

Fields

Field Type Required Description
action string Yes Action
arguments object Yes Arguments
created_at string Yes Created At
delivery object No Present while a request waits on an offline computer and after it expires unclaimed: whether the computer is checking for requests and when it last did.
device_id string Yes Device Id
diagnostic_code string No Approved product error code retained after copied diagnostics expire.
end object No End
expires_at string Yes Expires At
id string Yes Id
key string Yes Key
provider string Yes Provider
references object Yes References
result any Yes Result
result_expired boolean Yes Private cached prompts/results expire after one hour; intent digests and native references remain as replay fences.
state string Yes State

create

POST /api/v1/organizations/{organization_id}/agents/{id}/spark/local_threads/{local_thread_id}/operations

Operation ID: post_api_v1_organizations_organization_id_agents_id_spark_local_threads_local_thread_id_operations.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes
local_thread_id path string Yes

Request body

application/json

Property Type Required Description
action enum: threads.read, threads.release, threads.end, turns.start, turns.interrupt, threads.rename, ... Yes
arguments object Yes
key string Yes

Responses

202: Authorized local coding-agent thread

application/json

Property Type Required Description
operation object Yes
operation.action enum: agents.list, threads.list, threads.read, threads.start, threads.adopt, threads.release, ... Yes
operation.created_at string (date-time) Yes
operation.delivery object No Present while a request waits on an offline computer and after it expires unclaimed: whether the computer is checking for requests and when it last did.
operation.delivery.last_seen_at string,null (date-time) Yes
operation.delivery.message string Yes
operation.delivery.status enum: connected, offline, unknown Yes
operation.device_id string Yes
operation.diagnostic_code enum: active_turn, adoption_not_applied, claude_unavailable, codex_custody_unconfirmed, codex_preparation_failed, codex_thread_busy, ... No Approved product error code retained after copied diagnostics expire. Absent for success, unknown codes and older cleared receipts; it does not reconcile uncertain delivery.
operation.end object No
operation.end.can_dismiss boolean Yes Durable permission to dismiss this End receipt after safe refusal, unclaimed expiry, or confirmed retirement.
operation.end.native_finished_at string,null (date-time) Yes
operation.end.operation_id string Yes
operation.end.retired_at string,null (date-time) Yes
operation.end.status enum: ending, cleanup_pending, ended, failed, expired, uncertain Yes
operation.expires_at string (date-time) Yes
operation.id string Yes
operation.provider enum: codex, claude Yes
operation.references object Yes
operation.references.input_id string No
operation.references.provider enum: codex, claude No
operation.references.source_operation_id string No
operation.references.thread_id string No
operation.references.turn_id string No
operation.result object or object or object or object or object or object or object or object or object or object or null Yes
operation.result_expired boolean Yes Private cached prompts/results expire after one hour; intent digests and native references remain as replay fences.
operation.state enum: queued, claimed, completed, failed, expired, uncertain Yes

load

GET /api/v1/organizations/{organization_id}/agents/{id}/spark/local_threads/{local_thread_id}/operations/{operation_id}

Operation ID: get_api_v1_organizations_organization_id_agents_id_spark_local_threads_local_thread_id_operations_operation_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes
local_thread_id path string Yes
operation_id path string Yes

Responses

200: Authorized local coding-agent thread

application/json

Property Type Required Description
operation object Yes
operation.action enum: agents.list, threads.list, threads.read, threads.start, threads.adopt, threads.release, ... Yes
operation.created_at string (date-time) Yes
operation.delivery object No Present while a request waits on an offline computer and after it expires unclaimed: whether the computer is checking for requests and when it last did.
operation.delivery.last_seen_at string,null (date-time) Yes
operation.delivery.message string Yes
operation.delivery.status enum: connected, offline, unknown Yes
operation.device_id string Yes
operation.diagnostic_code enum: active_turn, adoption_not_applied, claude_unavailable, codex_custody_unconfirmed, codex_preparation_failed, codex_thread_busy, ... No Approved product error code retained after copied diagnostics expire. Absent for success, unknown codes and older cleared receipts; it does not reconcile uncertain delivery.
operation.end object No
operation.end.can_dismiss boolean Yes Durable permission to dismiss this End receipt after safe refusal, unclaimed expiry, or confirmed retirement.
operation.end.native_finished_at string,null (date-time) Yes
operation.end.operation_id string Yes
operation.end.retired_at string,null (date-time) Yes
operation.end.status enum: ending, cleanup_pending, ended, failed, expired, uncertain Yes
operation.expires_at string (date-time) Yes
operation.id string Yes
operation.provider enum: codex, claude Yes
operation.references object Yes
operation.references.input_id string No
operation.references.provider enum: codex, claude No
operation.references.source_operation_id string No
operation.references.thread_id string No
operation.references.turn_id string No
operation.result object or object or object or object or object or object or object or object or object or object or null Yes
operation.result_expired boolean Yes Private cached prompts/results expire after one hour; intent digests and native references remain as replay fences.
operation.state enum: queued, claimed, completed, failed, expired, uncertain Yes

GET /api/v1/organizations/{organization_id}/agents/{id}/spark/local_threads/operations/{operation_id}

Operation ID: get_api_v1_organizations_organization_id_agents_id_spark_local_threads_operations_operation_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes
operation_id path string Yes

Responses

200: Authorized native session adoption receipt

application/json

Property Type Required Description
operation object Yes
operation.action enum: agents.list, threads.list, threads.read, threads.start, threads.adopt, threads.release, ... Yes
operation.created_at string (date-time) Yes
operation.delivery object No Present while a request waits on an offline computer and after it expires unclaimed: whether the computer is checking for requests and when it last did.
operation.delivery.last_seen_at string,null (date-time) Yes
operation.delivery.message string Yes
operation.delivery.status enum: connected, offline, unknown Yes
operation.device_id string Yes
operation.diagnostic_code enum: active_turn, adoption_not_applied, claude_unavailable, codex_custody_unconfirmed, codex_preparation_failed, codex_thread_busy, ... No Approved product error code retained after copied diagnostics expire. Absent for success, unknown codes and older cleared receipts; it does not reconcile uncertain delivery.
operation.end object No
operation.end.can_dismiss boolean Yes Durable permission to dismiss this End receipt after safe refusal, unclaimed expiry, or confirmed retirement.
operation.end.native_finished_at string,null (date-time) Yes
operation.end.operation_id string Yes
operation.end.retired_at string,null (date-time) Yes
operation.end.status enum: ending, cleanup_pending, ended, failed, expired, uncertain Yes
operation.expires_at string (date-time) Yes
operation.id string Yes
operation.provider enum: codex, claude Yes
operation.references object Yes
operation.references.input_id string No
operation.references.provider enum: codex, claude No
operation.references.source_operation_id string No
operation.references.thread_id string No
operation.references.turn_id string No
operation.result object or object or object or object or object or object or object or object or object or object or null Yes
operation.result_expired boolean Yes Private cached prompts/results expire after one hour; intent digests and native references remain as replay fences.
operation.state enum: queued, claimed, completed, failed, expired, uncertain Yes