Skip to content

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.

NameTypeRequiredDefaultConstraintsDescription
metroPortunknownNoOverride Metro port for reconnection (default: keep current)
platformunknownNoPlatform filter for reconnection (e.g. “ios”, “android”)
hardResetunknownNo
bundleIdunknownNo
cdp_restart()