--remote-debugging-port=9222 or enable it at chrome://inspect/#remote-debugging.
This is what most automation tools use under the hood.
chrome.debugger permissions instead of external CDP
connections. The extension runs inside Chrome, so it never triggers the remote debugging
permission dialog. The user clicks the extension icon once on a tab, and the agent has full
CDP access from that point forward.| Chrome Direct CDP | Playwriter | |
| Permission dialog | Every connection | Never |
| Autonomous agents | Blocked by dialog | Works unattended |
| Chrome restart needed | Yes (--remote-debugging-port) | No |
| Login state | Depends on profile flags | Already logged in |
| User intervention | Required every reconnect | One-time extension click |
| Extensions available | Yes | Yes |
| Full CDP access | Yes | Yes |
chrome --remote-debugging-port=9222chrome://inspect/#remote-debugging--direct mode, you can still use Chrome's built-in CDP when you
need it (for example, to access all open tabs at once). But for most agent workflows,
the extension mode is better because it avoids the dialog entirely.1234567# Extension mode (recommended): no dialog, no flags playwriter session new playwriter -s 1 -e "page.goto('https://example.com')" # Direct mode: uses built-in CDP, dialog appears once playwriter session new --direct playwriter -s 1 -e "page.goto('https://example.com')"