Send tool results
Steer
Send tool results
Answer the agent’s pending custom tool calls.
POST
Send tool results
Sends results for pending custom tool calls. When the agent calls a custom tool, the session waits on
awaiting_tool_results; posting a result for every pending call resumes the run. The SDK run helpers call this endpoint for you.
Returns 202 Accepted. The result is delivered asynchronously: the agent resumes once every pending call has one.
Path parameters
The session ID.
Request body
Send either a single settled call or a batch. A single call is atool_result on success or an error_event on failure (discriminated by kind); a batch wraps a list of them. Each call echoes back the pending tool_req from pending_tool_calls ({ tool_name, args, id }), not just its id.
Tool result (success)
Must be
"tool_result".The pending tool call this answers, echoed back from
pending_tool_calls: { tool_name, args, id }.result
JSON-serializable tool output, shown to the model.
Tool error (failure)
Must be
"error_event".Error text shown to the model.
Component that produced the error, e.g.
"custom_tools".The pending tool call this answers, echoed back from
pending_tool_calls.Batch
Must be
"batch".Array of
tool_result and/or error_event objects.Examples
Send a single result
Send a batch of results
Errors
| Status | Cause |
|---|---|
404 | Session not found, or you don’t have access. |
409 | The session already finished. |
422 | Unknown tool_req.id, or invalid result format. |