Which calls pause, and how
A client tool call whose input fails the tool’s
input_schema is never handed to you, even after an approval. The platform answers the model with an error naming the schema failure, and the model can try again.
When a model round contains any call that needs confirmation, the whole round pauses. Nothing in that round runs until you post confirmations.
Declare a client tool
Client tools live intools.client_tools of the instance config. See Instance configuration for every rule.
The examples on this page come from Harbor Group, a fictional company that reviews its suppliers. Its application keeps a record for each supplier. One tool reads a supplier’s review status; the other emails the supplier’s contact a reminder.
Run client tools
The routes below sit under/conversations/instances/{instance_slug}/conversations/{conversation_id}/turns/{turn_id}. Each takes the conversation’s end_user.
1
Open the stream as the executor
After you admit a turn, open its stream with The first line of the answer says whether you hold the lease:
executor set to an id you choose for this process, and Nexio-Executor-Until set to the time your process will stop serving the turn (RFC 3339 or unix milliseconds). The subscription is also your claim on the turn’s executor lease: one executor per turn.: executor <epoch> (you hold it; keep the epoch), : executor held (another executor holds it), or : executor sealed (the turn was stopped). The last two still stream, as a plain subscription. Closing the stream releases the lease at once. If your connection drops, reconnect with the same executor id and after set to your last seq: the platform treats it as the same executor.2
Watch for tool_use frames
A client tool call arrives as a
tool_activity frame with phase: "started", then a tool_use frame. The frame carries no input.3
Accept the call
POST .../tool-calls/{tool_call_id}/accept, with the seq of the tool_use frame. Accept within 5 seconds; a call nobody accepts in time is recorded as not run, and the model is told.200 answer hands you the call:input, which already passed the tool’s input_schema. approved is true when your user approved the call. A repeat accept by the same executor answers the same record, so a lost answer is safe to retry. Any 409 means do not run the call:4
Run the tool and post the result
Execute the call on behalf of the same end user, before The answer is
deadline_at, then POST .../tool-calls/{tool_call_id}/result:202 {"recorded": "live"} while the turn waits for it. The stream then carries a tool_activity frame for the call with phase: "completed", or "failed" when you set is_error: true, and the model continues.
The result answer says how it was recorded:
live (the turn used it), late (the turn was stopped or the deadline passed; the result replaces the step’s stored placeholder once), or ignored (a repeat, or cancelled). 409 tool_call_not_accepted means executor_id is not the executor that accepted the call. There is no other way to post a result: a turns POST that carries tool_results answers 409.
A call accepted and not answered by deadline_at gets the stored result “No result was recorded.” and the turn continues. A later result from the executor that accepted it still replaces that placeholder once.
Handle a confirmation
1
Read the pending_confirmation and turn_paused frames
The stream carries one
pending_confirmation frame per call that needs approval, then a turn_paused frame. The turn waits; the stream stays open.execution tells you where the call runs once approved: client means it comes to your executor as a tool_use frame, platform means the platform runs it.2
Show the action and collect a decision
Show your user the tool name and
input. The approval is for exactly what you displayed.3
Post confirmations with the same turn_id
Post one decision per paused call, covering exactly the paused ids, with the paused turn’s The answer is
turn_id.202 with the turn and its stream, as for a message. The frames continue on the same stream with the next seq. If your stream closed during the pause, open it again with after set to the last seq you applied. A repeat of the same decisions answers the turn as it is; the decision admitted first stands.confirmations fields:
What happens next:
- A denied call is answered to the model as an error carrying your
reason, and atool_activityframe withphase: "failed"is sent. - An approved platform call runs on the server.
- An approved client call comes to your executor as a new
tool_useframe. Accept it as above; the accept answer carriesapproved: true. - Calls in the paused round that needed no approval run on the server or go to your executor.
The environment of an approved action
An approval covers the action as it was displayed, including the environment it would act on. The platform records the environment when the turn pauses, and the approved calls run against that environment, never the one on the continuing request. If a paused action has no recorded environment,confirmations returns 409 confirmation_environment_unpinned, and the pause stays open: a new message in the same conversation gets 409 pending_turn. Start a new conversation and ask the question there.
Rules that return errors
A client that lost its local state learns from
pending_turn which calls wait for a decision (pending_call_ids). The error does not carry tool names or inputs. Read the turn’s stream again from after=0, or read the tool_use blocks in the transcript with GET /conversations/{conversation_id}, matching each block’s id to a pending call ID.
When a turn is stopped
When turn control is on for your environment, a user can stop a turn while your executor runs its tools. The stream carries aseal frame. Your executor then:
- Starts nothing new. An accept after the stop answers
409 turn_sealed, and that call did not run. - Aborts reads. A call whose
effectisreadorbrowsermay be abandoned; post nothing for it, or postoutcome: "cancelled". - Finishes writes. A call with any other effect finishes. Post its result as usual. It is recorded as
lateand replaces the step’s stored placeholder once; the stream carries anoutcomeframe for it. - Cancels the runs its tools started, through your normal run cancel path and its permission checks, only when the user stopped the turn (
turn_endwithstop_reason: "stopped").
What is recorded
Each call to a declared tool is recorded as a tool event with the tool name, where it ran (platform or client), its outcome (ok, error, invalid_input, pending_confirmation, denied, approved), and its duration in milliseconds. A call to a tool name the instance does not declare gets an error result and no tool event. Tool events appear in the conversation export.
In evaluation runs, no application is attached, so scenario scripts supply client tool results and confirmation decisions by tool name. An unscripted confirmation is denied.
Platform tools
Tools the platform runs on the server.
Turns and streaming
Frames, stop reasons, and errors.