terminal_wait
Block an interactive terminal session until output matches a regex, becomes quiet, exits, or times out, then return the reason, match status, and rendered screen.
Instructions
Block until output matches a regex, becomes quiet, the session exits, or timeout.
Args:
session_id: Session returned by terminal_start.
until: Case-insensitive regular expression to wait for, e.g. "PS C:\|>>>|Done".
quiet_ms: Return when no output arrived for this long (0 disables quiet detection).
Provide at least one of until or quiet_ms.
timeout_ms: Give up after this long.
ignore_echo: Ignore the echo of the last command line when matching until
(prevents matching the command text itself).
Returns: reason: "matched" | "quiet" | "exited" | "timeout", matched, running, exit_code, and the rendered screen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| until | No | ||
| quiet_ms | No | ||
| session_id | Yes | ||
| timeout_ms | No | ||
| ignore_echo | No |