interrupt
Stops a session's running command when it takes too long, safe even if idle; resets the shell and immediately ends any in-flight command.
Instructions
Stops whatever is running on a session, e.g. a command taking far longer than expected. Safe to call even if nothing is currently running. This resets the session's shell: the working directory is restored, but shell variables and background jobs are gone, and any run_command still in flight returns immediately marked interrupted. Plan on having lost that state rather than assuming continuity.
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": "interrupt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | The sessionId returned by open_session. |