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. Useful for recovering from stuck connection state (target drift, stale helpers after many reloads) without losing the CC session.

NameTypeRequiredDefaultConstraintsDescription
metroPortnumberNoOverride Metro port for reconnection (default: keep current)
platformstringNoPlatform filter for reconnection (e.g. “ios”, “android”)
cdp_restart()