terminal_wait
Blocks until the shell returns to its prompt, output matches a regex, output goes quiet, the session exits, or a timeout occurs, then returns the rendered screen.
Instructions
Block until the shell is back at its prompt, output matches a regex, output goes 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, quiet_ms or prompt.
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).
prompt: Return as soon as the shell shows its prompt again (recommended after a command).
history: Number of scrollback lines included in the returned screen.
max_chars: Optional cap on the returned screen (0 = no cap).
Returns: reason: "prompt" | "matched" | "quiet" | "exited" | "timeout", matched, running, exit_code, and the rendered screen.
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>"
},
"name": "terminal_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| until | No | ||
| prompt | No | ||
| history | No | ||
| quiet_ms | No | ||
| max_chars | No | ||
| session_id | Yes | ||
| timeout_ms | No | ||
| ignore_echo | No |