Cursor icon

Cursor

Interact with the Cursor REST API to spawn and manage AI coding agents

Actions13

Run → Cancel

AI-generated

Summary

Cancel a specific run associated with a given agent by its IDs in the Cursor platform.

Inputs

  • Agent ID (required) — ID of the agent that owns the run
  • Run ID (required) — ID of the run

Output shape

a single JSON object containing success status and IDs of the canceled run and agent

Returns an object with keys 'success', 'runId', and 'agentId' confirming cancellation. No further run details are returned.

Examples

Example 1: Cancel a run for a given agent

Provide the agentId and the runId of the run to cancel.

Links

Discussion