wait_for_regex
Wait for a regex pattern to appear in terminal output, checking scrollback and live output within a configurable time limit.
Instructions
Wait for a regex match in rendered text and/or newly arriving PTY bytes.
Requires an existing session created via create_session(session_id, cwd).
This first checks already rendered scrollback, then waits on new PTY output.
deadline_s must be at most 300 seconds.
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": {
"session_id": "<session_id>",
"pattern": "<pattern>"
},
"name": "wait_for_regex"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | ||
| deadline_s | No | Total wall-clock budget in seconds. Must be between 0 and 300. | |
| session_id | Yes |