Cancel an OpenCode session
oc_cancelInterrupts the active execution of a session, stopping running work early so you can halt an agent task and regain control.
Instructions
Interrupt the active execution of a session.
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": "oc_cancel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionID | Yes |