Cancel a detached agent execution

Request cooperative cancellation of a running detached subagent. Repeated cancellation is idempotent.

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired
executionIdstringRequired

Query parameters

conversationIdstringOptional>=1 character
Required when the detached run belongs to a parent conversation.

Response

Cancellation accepted
executionIdstring
statusenum

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error