wait_regex
Wait for a specific regex pattern to appear on the terminal screen, then capture a snapshot. Enables precise synchronization instead of using blind delays.
Instructions
Block until pattern (a regex) appears on screen, then snapshot.
Returns {"ok", "matched", "alive", "text", "json"}. Timeout is not an error: the call returns ok=true with matched=false plus the final screen snapshot. Screen lines are right-padded with spaces — end-anchored patterns never match; use unanchored markers. This is the readiness sync — prefer it over a blind delay after send_line/send_keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| pattern | Yes | ||
| timeout_ms | No |