Skip to content

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.

NameTypeRequiredDefaultConstraintsDescription
url_patternunknownYes
methodunknownNo
timeout_msunknownNo5000min: 100, max: 60000, integerMax wait in ms (default 5000, range 100-60000)
poll_interval_msunknownNo100min: 50, max: 500, integerBuffer poll cadence in ms (default 100, range 50-500)
sinceunknownNo
devicestringNoDevice key OR “all”. Defaults to the active device.
cdp_wait_for_network(url_pattern: <unknown>)