Skip to main content
Sessions

Resolve a turn

When an agent requires tool call results (tool use) during execution, submit the tool execution results through this endpoint so the agent can continue processing. This endpoint is not currently enabled (returns 404). It may be an M3-gated feature or will be implemented in a future release.

Request headers

HeaderRequiredDescription
AuthorizationYesBearer
Content-TypeYesapplication/json

Path parameters

ParameterTypeRequiredDescription
session_idstringYesSession ID (sess_ prefix)
turn_idstringYesTurn ID (turn_ prefix)

Request body (expected)

FieldTypeRequiredDescription
tool_resultsarrayYesList of tool execution results
tool_results[].tool_use_idstringYesCorresponding tool_use ID
tool_results[].contentstringYesResult content returned by the tool

Example request

HELPCODEESCAPE-bash
curl -X POST "https://api.qoder.com.cn/api/v1/cloud/sessions/sess_019e392c0d1e74e095d21ea4c6b41def/turns/turn_019e392c0d787ceea6bb62943f9ac3ec/resolve" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tool_results": [
      {
        "tool_use_id": "toolu_abc123",
        "content": "Tool execution result data"
      }
    ]
  }'

Current status

This endpoint returns HTTP 404 (plain text 404 page not found), indicating the route is not yet registered.

Expected success response

HTTP 200 OK When the feature ships, the endpoint is expected to return the updated Turn state or an empty response.

Errors

HTTPtypeCondition
400invalid_request_errorMalformed request
401authentication_errorPAT is invalid or expired
404not_found_errorSession or Turn does not exist / route not implemented
409conflict_errorTurn is not in a state awaiting tool results
See Errors for the full error envelope.