cancel_agent_turn
Cancels an in-progress agent turn during LLM, tool, or stream execution to stop runaway loops, off-target responses, or compliance issues; multi-agent cancellations propagate via root_execution_id.
Instructions
Cancel an in-progress agent turn (mid-LLM, mid-tool, mid-stream). Useful for loop runaway, off-target responses, or compliance stops. In multi-agent (sub-agent) sessions, propagates via root_execution_id
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": {
"session_id": "<session_id>"
},
"name": "cancel_agent_turn"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Optional cancellation reason recorded in the operation audit log | |
| session_id | Yes | Target session_id string or UUID |