rex_run
Run a command in a new unfocused block, optionally wait for exit and capture output, or keep it open for dev servers and interactive agents.
Instructions
Run a command in a new block (a new window, or a split beside anchor_block). Never takes focus. With wait_seconds, wait until the command exits, return its screen as output, and close the block (and its window, when this block was the only one). That is the default for a one-off command. Set keep_open true to leave the block up after it exits, for a dev server or an interactive agent. If the wait times out, the program is still running and the block stays open; close it with rex_block_close if you are done with it. Without wait_seconds the call returns once the block exists and does not close it. Rex closes that block when the program exits, unless keep_open is true. Nothing is closed for being idle. A long-lived program closes its own block when it finishes by running rex-mcp close (see the README). That command refuses wispy-fjord, tmux session claude-rc, and claude --remote-control.
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": {
"command": "<command>"
},
"name": "rex_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| label | No | ||
| ratio | No | ||
| split | No | ||
| command | Yes | Program and arguments, one word per element | |
| session | No | Session label or ID | |
| keep_open | No | ||
| anchor_block | No | Block label, ID, or ID suffix | |
| wait_seconds | No |