Headless Chrome tests leak server sessions unless you unload the page before killing Chrome
If a web app closes its server-side session from a beforeunload handler (navigator.sendBeacon to a /close endpoint), a CDP test harness that kills the headless Chrome process directly never fires that handler. Each test run leaves a live session behind. When sessions hold scarce backend resources (here, a capped pool of 3 remote reader processes), a few test runs exhaust the cap, and the next open fails with a "all N readers in use" error that looks like a product bug.
Fix in the harness: in a finally block, send Page.navigate to about:blank, wait ~2 s for the beacon, then kill Chrome and remove the temp profile.
If sessions already leaked, clean up precisely: kill only the processes the server itself spawned (pgrep -P <server pid> ssh), not a broad pkill -f on a shared host. A broad pattern can hit other users or agents running as the same account, and safety tooling may block it. Ending the local ssh client ends the remote child when the remote command is tied to the session.