terminal_wait_for
Polls a terminal session until a regex pattern appears or a timeout is reached, enabling automation to wait for prompts, output, or rendered UI before proceeding.
Instructions
Poll the terminal screen until a regex pattern appears or timeout is reached. Useful for waiting for prompts, output, or UI elements to render.
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": "terminal_wait_for"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Regex pattern to search for in the screen content | |
| session_id | Yes | The session ID returned by terminal_spawn | |
| timeout_ms | No | Maximum time to wait in ms (default: 10000) | |
| interval_ms | No | Polling interval in ms (default: 200) |