wait_for_log
Wait for a mobile log line to match a regex pattern or timeout, then return the match status, matched line, and elapsed time.
Instructions
Block until a log line matching a pattern appears, or timeout. Returns {matched, line, elapsed}.
ALWAYS use via background subagent — never call directly or it blocks the whole conversation:
Spawn background subagent: 'Call wait_for_log(pattern, timeout). Report result.'
Then perform the action (tap/navigate) in the main agent
Main agent continues; subagent notifies when pattern matched
Spawn subagent BEFORE the action that triggers the log, not after.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | Which log buffer to watch (default 'all') | |
| pattern | Yes | Regex pattern to match against log lines (case-insensitive) | |
| timeout | No | Max wait time in ms (default 60000). Use at least 60000 to account for subagent startup overhead. | |
| deviceId | No | Restrict android/ios sources to this device's own log buffer. |