sandbox_procs
List, wait for, or stop the background commands on a box (sandbox_exec with background); a foreground command's execId works as a bgId too, so a result lost with a dropped connection can still be fetched or waited for. Job operations are scoped to the returned bgId. stop ends the whole process group, including descendant processes. Use it instead of pkill -f or pgrep -f, which match every process whose command line contains the pattern, other jobs included. wait with until "ready" returns once a server is up (readyPort or readyLog). list shows each job's cpu and whether this conversation started it (mine), and the foreground commands running now. Commands survive a restart of the box's agent (boxd); one that ended meanwhile has exitCode -1 and an endReason. Calls count as use of the box.
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": "sandbox_procs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| all | No | With list: include commands that have finished, with their exitCode and endReason | |
| bgId | No | From sandbox_exec with background, or the execId of a foreground sandbox_exec (running, or finished: then result holds what that call returned); required for stop and wait. With list: only that command, running or not, with its logTail and the steps psbx-step recorded | |
| until | No | For wait: exit (default) waits for the command to end; ready returns as soon as its readyPort or readyLog condition holds (or it ends first), so you test a server once it is up instead of after a fixed sleep | |
| action | No | Default list: the background commands still running, oldest first, each with bgId, note, cmd, startedAt, cpu and mine (whether this conversation started it), plus foreground: the foreground commands running now. stop: end one by bgId, with the whole process group, so the node under an npx goes too. wait: block until one finishes, or with until "ready" until it is ready | |
| readyLog | No | For wait: set or replace the job's readiness condition to a log line matching this regular expression, searched from the start of its log (implies until ready) | |
| readyPort | No | For wait: set or replace the job's readiness condition to this port accepting connections (implies until ready); for a job started without one | |
| tailBytes | No | How many bytes of the end of each log to return as logTail. list leaves logTail out unless bgId or tailBytes is given; stop, wait and list with bgId default to 4096 | |
| timeoutSec | No | For wait: give up waiting after this long and return it still running, default and maximum 600; over a remote connection from ChatGPT or Codex, which ends a tool call after about 5 minutes, at most about 270 |