cancel
Cancel an in-flight Cursor agent delegation by session ID. Optionally force-kill the agent process after a short grace period.
Instructions
Best-effort cancel of an in-flight ACP delegation by sessionId. Sends session/cancel; the agent may finish the turn anyway. The delegate result carries cancelRequested: true when the turn was cancelled mid-run. MCP hosts that serialize tool calls cannot run this while delegate is in flight. With force: true, the agent process is killed if the turn is still running after a short grace period. Returns not-running for a session whose turn already ended (it is still resumable), and not-found for an id never seen this process.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | After the cancel notify, wait a short grace period and kill the agent process if the delegation is still running | |
| sessionId | Yes |