Thread runs and inspection
Thread runs and inspection
threadsApi.startTurn()
Dispatches message.dispatch and returns a handle that follows the run it starts or joins.
startTurn(input: StartTurnInput): Promise<TurnHandle>;
Kind: instance method of ThreadsApi
threadsApi.interrupt()
Interrupts runId, or the thread’s active run when omitted; nothing active is a no-op.
async interrupt(
threadId: ThreadId,
runId?: RunId,
options: InterruptOptions = {},
signal?: AbortSignal,
): Promise<void>;
Kind: instance method of ThreadsApi
threadsApi.forceStop()
Force stop for an agent that ignored Stop: ends the turn and kills or releases its agent
process. With runId, fails OrchestrationV2ForceStopThreadError with reason superseded
and stops nothing once another run is the latest.
forceStop(
threadId: ThreadId,
options: ForceStopThreadOptions = {},
signal?: AbortSignal,
): Promise<OrchestrationV2ForceStopThreadResult>;
Kind: instance method of ThreadsApi
threadsApi.stop()
Legacy stop: interrupts the active run and holds the queue. Nothing active is a no-op.
stop(threadId: ThreadId, signal?: AbortSignal): Promise<void>;
Kind: instance method of ThreadsApi
threadsApi.stopThread()
Request native Stop, including idle, queued and background work, without an active-run lookup. Resolves on command acknowledgement, not terminal state. Any reason string is preserved. No capability gate or fallback is applied.
async stopThread(
threadId: ThreadId,
options: StopThreadOptions = {},
signal?: AbortSignal,
): Promise<void>;
Kind: instance method of ThreadsApi
threadsApi.resumeQueue()
Resume the queue, clearing the hold on all queued runs. Acknowledgement only.
async resumeQueue(threadId: ThreadId, signal?: AbortSignal): Promise<void>;
Kind: instance method of ThreadsApi
threadsApi.startQueuedRun()
Start a selected queued plain user message on a stopped thread. The server clears the hold on all queued runs, so other messages may follow. Resolves on acknowledgement; invalid selections propagate the server’s dispatch error. Select runId from status().queuedRuns or stock MCP queuedRunId.
async startQueuedRun(threadId: ThreadId, runId: RunId, signal?: AbortSignal): Promise<void>;
Kind: instance method of ThreadsApi
threadsApi.respondToApproval()
Answer a pending approval request.
async respondToApproval(input: ApprovalResponseInput, signal?: AbortSignal): Promise<void>;
Kind: instance method of ThreadsApi
threadsApi.respondToUserInput()
Answer a pending user-input request.
async respondToUserInput(input: UserInputResponseInput, signal?: AbortSignal): Promise<void>;
Kind: instance method of ThreadsApi
threadsApi.dismissUserInput()
Dismiss a pending user-input request.
async dismissUserInput(input: UserInputDismissInput, signal?: AbortSignal): Promise<void>;
Kind: instance method of ThreadsApi
threadsApi.pendingRequests()
Open approval and user-input requests, derived from the thread’s projection.
async pendingRequests(threadId: ThreadId, signal?: AbortSignal): Promise<PendingRequest[]>;
Kind: instance method of ThreadsApi
threadsApi.status()
Runs, queue, pending request counts and background work from the full HTTP
detail, with the shell’s derived background work. Raises T3NotFoundError
when the thread does not exist.
async status(threadId: ThreadId, signal?: AbortSignal): Promise<ThreadStatus>;
Kind: instance method of ThreadsApi
threadsApi.usage()
Provider-thread context usage and provider-turn usage with owning ids, from the full detail.
async usage(threadId: ThreadId, signal?: AbortSignal): Promise<ThreadUsage>;
Kind: instance method of ThreadsApi
threadsApi.diff()
The checkpoint diff for range; without one, the full-thread diff through the
latest completed run checkpoint. Server checkpoint errors propagate.
async diff(
threadId: ThreadId,
range?: ThreadDiffRange,
signal?: AbortSignal,
): Promise<ThreadDiff>;
Kind: instance method of ThreadsApi
threadsApi.search()
Substring search of active threads’ finished user and assistant messages: one
match per thread, at most limit (default and maximum 50). titlesOnly skips
message search. olderSettledBefore also returns in threads the rows of the
best matching threads settled before it; send it, projectIds,
environmentLabel and titlesOnly only to servers that advertise
shellOlderSettled.
search(input: ThreadSearchInput, signal?: AbortSignal): Promise<ThreadSearchResult>;
Kind: instance method of ThreadsApi
threadsApi.searchContent()
The server’s find-within-thread: the selected match, its ordinal and the total.
searchContent(
input: ThreadContentSearchInput,
signal?: AbortSignal,
): Promise<ThreadContentSearchResult>;
Kind: instance method of ThreadsApi
threadsApi.watch()
Resumable live view; the projection is seeded from the HTTP detail when resuming.
watch(threadId: ThreadId, options: WatchOptions = {}): AsyncIterable<ThreadWatchItem>;
Kind: instance method of ThreadsApi
threadsApi.watchCommandOutput()
Follow one command row’s output; decode failures remain stream items.
watchCommandOutput(
input: OrchestrationV2SubscribeCommandOutputInput,
options: WatchCommandOutputOptions = {},
): AsyncIterable<DecodedStreamItem<OrchestrationV2CommandOutputFrame>>;
Kind: instance method of ThreadsApi
threadsApi.phase()
Derive the visible phase from a thread summary.
phase(thread: OrchestrationV2ThreadShell): ThreadPhase;
Kind: instance method of ThreadsApi
threadsApi.dispatch()
Any orchestration command, validated locally and sent over the socket.
dispatch(command: OrchestrationV2Command, signal?: AbortSignal): Promise<DispatchResult>;
Kind: instance method of ThreadsApi