Skip to main content
POST
Approve or decline a suspended tool call

Authorizations

Authorization
string
header
required

JWT authentication token

Path Parameters

id
string<uuid>
required

Task ID

Body

application/json

Decision payload for a pending tool call. For plan_review, approve executes the approved plan in the same task stream, while decline asks the planner to revise it using metadata.feedback. The revised plan requires approval again. Terminal task cancellation uses the task abort endpoint instead. ask_question answers remain supported in metadata.answers.

decision
enum<string>
required

Whether to approve or decline the pending tool call. Declining a plan_review requests a revision; it does not cancel the task.

Available options:
approve,
decline
agent_id
string

Agent ID to resume (optional, resolved from stream metadata if omitted)

metadata
object

Additional data passed to the resumed tool. Use answers for ask_question. For a declined plan_review, use feedback with revision guidance; interactive clients should require a string whose trimmed value is non-empty.

run_id
string

Agent run ID (optional, resolved from stream metadata if omitted)

tool_call_id
string

Exact pending tool call to approve. When target metadata is available, this value is matched atomically with the suspended approval and a mismatch is rejected. It remains optional only for compatibility with legacy suspended tasks that have no stored target.

Response

Approval processing result. success: false reports an agent-side failure such as a target mismatch without changing the HTTP 200 status.

success
boolean
required
code
enum<string>

Stable machine-readable reason when approval failed

Available options:
approval_target_mismatch,
approval_not_suspended,
approval_invalid_feedback,
approval_metadata_unavailable,
approval_metadata_invalid,
approval_expired,
agent_not_found,
redis_unavailable,
approval_state_unavailable,
active_stream_registration_failed,
agent_unavailable
error
string

Error message if approval failed

stream_id
string

ID of the resumed stream