Playwriter vs Chrome Direct CDP
Chrome has a built-in remote debugging mode that exposes the Chrome DevTools Protocol (CDP) over a WebSocket.
You can launch Chrome with --remote-debugging-port=9222 or enable it at chrome://inspect/#remote-debugging.
This is what most automation tools use under the hood.
The problem: Chrome now shows a permission dialog every time an external app tries to connect.
The dialog says "An external app wants full control over this Chrome session to debug it" and requires
the user to click Allow before any automation can start. The Cancel button is visually
highlighted as the recommended action. This is by design; Chrome wants to prevent background
processes from silently hijacking browser sessions.
This single dialog breaks every autonomous agent use case. An agent can't click Allow
on its own. The user must be present, watching, and ready to click every time the agent
reconnects. If Chrome restarts, the dialog appears again. If the connection drops, the dialog
appears again.
There is a second, stricter limit. Since Chrome 136, --remote-debugging-port is
ignored on your default profile as a security mitigation. You must launch with a
throwaway --user-data-dir, which is a fresh profile with none of your logins or extensions.
So Chrome's built-in CDP either can't touch your real profile at all, or triggers a dialog
you have to approve by hand.