Stop a background run
sh_killStop a background process by its run ID. Sends SIGTERM (escalates to SIGKILL after 2s) to the process group, ensuring child processes terminate. Returns 'terminating' or 'already_exited' if already stopped.
Instructions
Stop a background run started with sh_run background:true, by id. Signals the whole process group (so a dev server's children die too). SIGTERM (the default) escalates to SIGKILL after 2s if the process ignores it. Returns status:"terminating" — the signal was sent but the OS hasn't confirmed the process is dead yet; poll sh_logs to see it settle to exited/killed. Killing an id whose process has ALREADY exited is not an error — it returns already_exited (idempotent).
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": {
"id": "<id>"
},
"name": "sh_kill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The background run id returned by sh_run (e.g. cmd7). | |
| signal | No | Signal to send. SIGTERM escalates to SIGKILL after 2s. | SIGTERM |