Skip to content

[BUG] session daemon opens a console window on Windows #42152

Description

What's going on?

On Windows every CLI session opens an empty console window next to the browser. I expected only the browser window.

`playwright-cli -s=mysession open https://example.com`

The window stays until the session is closed, and there is one per session name rather than one per command, so it looks like the daemon rather than the individual calls.

cli-client/session.ts spawns the daemon detached without windowsHide: true. node.exe is console-subsystem, so Windows hands it a console; on Linux detached is just setsid and nothing shows. Same in cli-client/program.ts and backend/devtools.ts.

There is history on this flag, but on a different spawn: processLauncher.ts got windowsHide in #38776 and it was reverted in #39994 because it also hid the Inspector and UI mode. That cannot happen here, since these spawns only start background daemons and none of them is a window a user is meant to see.

Happy to send a PR. Windows 11, Node 24, Chrome channel.

Version

@playwright/cli 0.1.18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions