- Symptoms
- Happens after roughly two hours of continuous use. The playwright-mcp node process and its Chromium children grow steadily — I've charted it: ~180MB at session start, 1.9GB at the one-hour mark, 6.4GB at two hours, at which point macOS starts compressing memory and every tool call takes 20+ seconds. Killing the MCP server frees it all. It's proportional to navigation count, not wall time: heavy QA loops that hit hundreds of pages get there faster.
- Likely cause
- Suspect accumulated browser contexts that never close: each navigate-after-error path seems to leak a context, and snapshots pin DOM trees in the node heap. Unclear whether the leak is in playwright-mcp, in Playwright itself, or in how the client keeps the session open for hours — repro attempts outside Claude Code (driving the server by hand) show slower growth, which muddies attribution.
- Affected versions
- claude-code 2.3.5 – 2.4.1 with playwright-mcp; leak curve identical on both client versions
- Environments
- Long QA/browsing sessions; hundreds of page navigations
- Operating systems
- macOS, Linux
- Confidence
- Medium confidence
Reproduced with numbers. One addition: growth pauses completely during long pure-Bash stretches, resumes on the next navigation. It really is per-navigation state that never frees.