rex_wait
Waits for a terminal block to exit or its output to match a JavaScript regex, returning completion, timeout, exit code, or match data. Use it to synchronize automation with running commands.
Instructions
Wait on a block. until: exit waits for the terminal's program to exit; until: match polls the capture for pattern (a JS regex). Returns {done, timed_out, exit_code?, match?}.
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": {
"block": "<block>",
"until": "<until>"
},
"name": "rex_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| block | Yes | Block label, ID, or ID suffix | |
| until | Yes | ||
| pattern | No | ||
| session | No | Session label or ID | |
| timeout_seconds | No |