Cleaning Playwright Browser Caches via Claude Code

X postdaveTutorial

Dave (@dave_deguzza) recommends using Claude Code to locate and remove outdated Playwright and Puppeteer Chromium caches while pointing Playwright MCP to the auto-updating system Chrome.

Key points

  1. The suggested Claude Code prompt searches for Playwright and Puppeteer caches and deletes Chromium builds older than version 156.0.8078.73.
  2. It modifies the Playwright MCP configuration to pass --browser chrome --sandbox, reusing the system's auto-updated Chrome binary.
  3. The author highlights that Claude Code requests explicit approval and displays full file paths before each deletion by default.
  4. Using system Chrome uses a clean profile under ms-playwright/mcp-chrome-* without touching personal sessions, and --isolated avoids local persistence entirely.

Why it matters

Outdated browser binaries left in automation caches pose vulnerability risks. While using AI assistants to remediate MCP configurations speeds up maintenance, delegating filesystem cleanup to agents remains contentious.

Analysis

Dave's approach provides a quick fix for browser vulnerabilities without uninstalling Playwright entirely. Critics in the discussion warn against letting AI agents delete local filesystem paths and advocate running browsers in Docker containers. Dave counters that default confirmation prompts and isolated user-data directories provide adequate isolation.

Original post

dave

@dave_deguzza · 3 November 2026

Don't delete Playwright. Paste this into Claude Code instead: "Find every Playwright/Puppeteer browser cache on this machine and delete the Chromium builds older than 156.0.8078.73. Then edit the Playwright MCP config to add --browser chrome --sandbox so it uses my auto-updated

2.6k likes59 replies6k bookmarks232.1k views

View on X
More posts in the thread (2)
  1. @nkozyra FYI Claude asks before every delete and shows you the full path. You approve each one. Nothing runs on its own unless you've turned that off.
  2. @bjornbjorn @EAyramia @usetraceix @Securityblog Different profile, same binary. --browser chrome only picks the executable. Playwright MCP launches it with its own blank user-data-dir under ms-playwright/mcp-chrome-*. Your Gmail session never enters it. Add --isolated and nothing persists at all.
Selected replies (5)
  • @nkozyra @dave_deguzza Telling Claude to find something and delete it "on this machine" What could possibly go wrong?
  • @joeyjjooste @nkozyra @dave_deguzza Been running in full bypass mode for months, never had an issue, everything is backed up so it can all be restored if soemthing goes wrong
  • @nkozyra @joeyjjooste @dave_deguzza That's great, but it's been happening. I could ride a motorcycle after 8 beers and conclude it's perfectly safe. There are much better mitigations than setting an agent loose on your filesystem. These things should be very much sandboxed.
  • @nkozyra @joeyjjooste @dave_deguzza I use Claude. Everybody uses Claude.
  • @usetraceix @dave_deguzza @Securityblog Don’t use your system chrome for playwright please Jesus fucking Christ guys common

Summary generated by AI (Gemini 3.8 Flash, 4 November 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • Article:Anthropic

    Claude Code in the Browser: Anthropic Documents Chrome Integration

    Anthropic details how to connect Claude Code with Chromium-based browsers via the Claude in Chrome extension. Developers can execute browser automation tasks directly from the CLI or VS Code to test local web applications, debug console errors, and automate form submissions.

    AI & LLMs· Tool

  • Video

    Video:CURT

    Decluttering Your AI Setup: Optimising Claude Code and Codex

    Constantly switching between AI environments like Claude Code and OpenAI Codex often leads to accumulated dead skills, outdated memory files, and conflicting instructions that consume context windows. This video presents a structured method to audit past usage, consolidate instructions around AGENTS.md, isolate project contexts, and convert complex tools into lean Markdown playbooks.

    AI & LLMs· Tutorial

  • X post:Emanuele Di Pietro

    Optimising App Performance with Claude Code and Opus 5.5

    Emanuele Di Pietro shares a prompt for Claude Code that enabled Opus 5.5 to run for three hours, identifying and fixing several overlooked performance bugs in his Electron app Synara.

    3.3kbookmarks181.4kviews

    AI & LLMs· Demo

  • Link:Anthropic

    Claude in Chrome: Anthropic Introduces Browser Automation Assistant

    Anthropic has introduced 'Claude in Chrome', a browser extension for paid subscribers that reads web pages, clicks, types, and fills forms. It connects with Claude Cowork and Claude Code to automate tasks across tabs and internal web interfaces lacking dedicated APIs.

    AI & LLMs· Tool

  • Repository:anthropics/claude-code

    Claude Code: Terminal-Based Agentic Coding Tool

    Claude Code by Anthropic is an agentic coding tool that operates in the terminal. It understands codebases, executes routine development tasks, explains complex code, and handles Git workflows using natural language commands.

    144.1kstarsPython

    AI & LLMs· Tool

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.