playwright-cli open spawns cliDaemon.js detached and unref'd, and the daemon holds its browser until something sends close. When the caller is an agent (Claude Code, Codex) that opens a named session, finishes its task, and exits, nothing ever sends it. Each leaked session then keeps a Chrome renderer running at full rate, since the browser is launched with --disable-background-timer-throttling.
Measured on one machine over a day of agent use: 18 daemons (the oldest 21 h), 127 Chrome processes, ~25 GB RSS and ~6 cores busy. The next day there were 29 more.
Suggestion
Give the daemon a lifetime it can check itself, in one of these shapes:
open --owner-pid <pid> (or read a well-known env var such as CLAUDE_PID): the daemon polls the pid and exits when it is gone.
open --idle-timeout <duration>: exit after that long without a command over the socket.
Either could default on for agent clients — the CLI already detects CLAUDECODE / COPILOT_CLI — since an agent is exactly the caller that will not come back to close.
Version: @playwright/cli 0.1.19, playwright-core 1.63.0-alpha-2026-08-31, macOS 26.
This was written by Claude Code on behalf of max-sixty
playwright-cli openspawnscliDaemon.jsdetached and unref'd, and the daemon holds its browser until something sendsclose. When the caller is an agent (Claude Code, Codex) that opens a named session, finishes its task, and exits, nothing ever sends it. Each leaked session then keeps a Chrome renderer running at full rate, since the browser is launched with--disable-background-timer-throttling.Measured on one machine over a day of agent use: 18 daemons (the oldest 21 h), 127 Chrome processes, ~25 GB RSS and ~6 cores busy. The next day there were 29 more.
Suggestion
Give the daemon a lifetime it can check itself, in one of these shapes:
open --owner-pid <pid>(or read a well-known env var such asCLAUDE_PID): the daemon polls the pid and exits when it is gone.open --idle-timeout <duration>: exit after that long without a command over the socket.Either could default on for agent clients — the CLI already detects
CLAUDECODE/COPILOT_CLI— since an agent is exactly the caller that will not come back toclose.Version:
@playwright/cli0.1.19,playwright-core1.63.0-alpha-2026-08-31, macOS 26.