Skip to content

fix(#470): warn about Windows headless cookie persistence bug#476

Open
giulio-leone wants to merge 1 commit intovercel-labs:mainfrom
giulio-leone:fix/470-windows-headless-cookies
Open

fix(#470): warn about Windows headless cookie persistence bug#476
giulio-leone wants to merge 1 commit intovercel-labs:mainfrom
giulio-leone:fix/470-windows-headless-cookies

Conversation

@giulio-leone
Copy link
Contributor

Summary

Adds a warning when launching a persistent profile in headless mode on Windows, alerting users about the known Chromium bug where cookies are silently discarded.

Problem

On Windows, --profile (persistent context) in headless mode creates the profile directory and writes cookies during the session, but silently discards them on browser close. This is a confirmed upstream Chromium bug.

Fix

Add console.warn() in browser.ts when:

  • process.platform === 'win32'
  • options.headless is true or undefined (the default)
  • A persistent profile is being used

The warning suggests using --headed or AGENT_BROWSER_HEADED=1 for reliable cookie persistence.

Upstream References

Closes #470
Related: #253, #42, #77

@vercel
Copy link
Contributor

vercel bot commented Feb 14, 2026

@giulio-leone is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Add console.warn when launching persistent profile in headless mode
on Windows, alerting users about the known Chromium bug where cookies
are silently discarded. Suggests using --headed or AGENT_BROWSER_HEADED=1.

Co-authored-by: Copilot <[email protected]>
@giulio-leone giulio-leone force-pushed the fix/470-windows-headless-cookies branch from 3dacf98 to b6ea099 Compare February 14, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] Headless mode silently drops cookies from persistent profiles

1 participant