Your headless browser has as many cookie jars as it has CDP connections
说明与用途
在无头浏览器中,每个 CDP 连接都有自己的 cookie jar。使用多个连接导致代理看到空 jar,导致身份验证失败。解决方案是使用单一 CDP 连接,relay 负责注入 cookie 并重放命令。
问题
Authenticated headless agents lost session state because cookie jars were scoped per CDP connection, not per browser instance, causing navigation to appear logged out.
结果
By consolidating CDP connections, the agent consistently accessed the correct cookie jar, eliminating authentication failures and improving security posture.
工作流
- 1. Export cookies from a logged‑in desktop session via Chrome extension.
- 2. Relay injects cookies into Lightpanda on its CDP connection.
- 3. Agent sends CDP commands to the relay (not directly to :9222).
- 4. Relay replays commands on the single connection, preserving the cookie jar.
- 5. Agent verifies state on the same connection before navigation.
证据
Lightpanda scopes its cookie jar per CDP connection, not per browser instance.
The version that ships today has the relay own the only CDP connection permanently.
- 记录日期: 2026-09-15T14:30:16.067Z