agent

Cancel a run

Cancel an agent run that is currently queued or in progress. Once cancelled, the run will transition to a cancelled state.

Not all runs can be cancelled. Runs that are in a terminal state (SUCCEEDED, FAILED, ERROR, BLOCKED, CANCELLED) return 400. Runs in PENDING state return 409 (retry after a moment). Self-hosted, local, and GitHub Action runs return 422.

post/agent/runs/{runId}/cancel

Path parameters

runIdstring required

The unique identifier of the run to cancel

Response

Run cancelled successfully

string required

The ID of the cancelled run

Changes

Changed in 1 of the 2 revisions of this API.12

    • added the optional property auth_url to the response with the 400 status

      response-optional-property-added

    • added the optional property auth_url to the response with the 401 status

      response-optional-property-added

    • added the optional property auth_url to the response with the 403 status

      response-optional-property-added

    • added the optional property auth_url to the response with the 404 status

      response-optional-property-added

    • added the optional property auth_url to the response with the 409 status

      response-optional-property-added

    • added the optional property auth_url to the response with the 422 status

      response-optional-property-added

    • added the optional property provider to the response with the 400 status

      response-optional-property-added

    • added the optional property provider to the response with the 401 status

      response-optional-property-added

    • added the optional property provider to the response with the 403 status

      response-optional-property-added

    • added the optional property provider to the response with the 404 status

      response-optional-property-added

    • added the optional property provider to the response with the 409 status

      response-optional-property-added

    • added the optional property provider to the response with the 422 status

      response-optional-property-added