cdp_restart
In-process soft state reset. Disconnects the current CDP client, creates a fresh instance, and reconnects. Clears console/network/error ring buffers, background poll, reconnect state, and helpers-injected flag. Does NOT reload the MCP server binary — to load new dist/ after npm run build, fully quit and relaunch Claude Code. Pass hardReset=true to also kill the fast-runner xcodebuild rig and terminate+relaunch the target app via simctl — recovers from the “JS thread paused / app backgrounded” wedge (B154 shape) without requiring a manual /reload-plugins. Useful for recovering from stuck connection state (target drift, stale helpers after many reloads) without losing the CC session.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
metroPort | unknown | No | Override Metro port for reconnection (default: keep current) | ||
platform | unknown | No | Platform filter for reconnection (e.g. “ios”, “android”) | ||
hardReset | unknown | No | |||
bundleId | unknown | No |
cdp_restart()