cdp_wait_for_network
Block until a network request matching url_pattern (URL substring) and optional method completes (response received), or timeout_ms elapses. Two-phase: scans the existing buffer first (retroactive match), then polls every poll_interval_ms until deadline. Returns {matched:true, mutation, network_log_since} on success or {matched:false, timeout_ms, candidates_seen} (capped at 10) on timeout — never errors on timeout; agents should check data.matched. Use after triggering an action that fires a request to deterministically confirm it landed without buffer-churn races. Pin since to a timestamp captured BEFORE the trigger (Date.now() ISO) to also catch mutations that land in the MCP transport window. On RN < 0.83 (hook network mode) new-entry detection granularity is ~500ms — sub-500ms poll_interval_ms buys nothing there.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
url_pattern | unknown | Yes | |||
method | unknown | No | |||
timeout_ms | unknown | No | 5000 | min: 100, max: 60000, integer | Max wait in ms (default 5000, range 100-60000) |
poll_interval_ms | unknown | No | 100 | min: 50, max: 500, integer | Buffer poll cadence in ms (default 100, range 50-500) |
since | unknown | No | |||
device | string | No | Device key OR “all”. Defaults to the active device. |
cdp_wait_for_network(url_pattern: <unknown>)