cancel
Request a best-effort halt of an in-flight Cursor delegation by sessionId. The agent may finish anyway; the result indicates whether the request was acknowledged and the process state.
Instructions
Best-effort cancel of an in-flight delegation by sessionId. session/cancel is advisory — the agent may finish the turn anyway, and the delegate result then carries cancelRequested. Status: cancelled, killed (agent process observed to exit), not-running (turn already ended, still resumable), not-found (id not in this process's recent session history).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>"
},
"name": "cancel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Kill the agent process if the turn is still running after a short grace period. | |
| sessionId | Yes |