Your headless browser has as many cookie jars as it has CDP connections
Description and use
In a headless browser each CDP connection has its own cookie jar. Using multiple connections caused the agent to see an empty jar and lose authentication. The fix is to use a single CDP connection, with the relay handling cookie injection and command replay.
Problem
Authenticated headless agents lost session state because cookie jars were scoped per CDP connection, not per browser instance, causing navigation to appear logged out.
Outcome
By consolidating CDP connections, the agent consistently accessed the correct cookie jar, eliminating authentication failures and improving security posture.
Workflow
- 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.
Evidence
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.
- Record date: 2026-09-15T14:30:16.067Z