Repository navigation
Description
Proposal
Remove the playwright@claude-plugins-official plugin (the Playwright MCP browser tools) from the claude-code template, after a two-month review window. Review on 2026-11-25.
It is being replaced as the default browser tool for agents by agent-browser, which the default image already installs (AGENT_BROWSER_VERSION, wired to /usr/bin/chromium through AGENT_BROWSER_EXECUTABLE_PATH). A companion change makes agent-browser the first choice: a renamed and rewritten sandbox-playwright skill shipped from the image, plus a managed rule. Playwright stays the fallback, but only through its test runners, which don't need this plugin:
- a project's
@playwright/testsuite (tests that live in the repo and run in CI); - vitest browser mode and Storybook interaction tests (
@vitest/browser-playwright); - Firefox or WebKit coverage (agent-browser drives Chromium);
- containers without agent-browser. Today that is the
sandboxtarget; the companion change adds it there.
Why
- Agents drift to it. While the MCP tools are loaded in every session, agents pick them over the preferred tool.
- Maintenance cost. Keeping it working in these images has taken fix(claude-code): Playwright MCP plugin fails on ARM64 — chrome not found #64,
init-plugins.sh: all plugin installs fail silently — missing marketplace registration + wrong ralphex repo + ARM64 patch targets wrong path #74, Playwright MCP plugin can't launch a browser inclaude-code-sandbox, and the existing ARM64 patch is broken inclaude-codetoo #85, Bakepatch-playwright-mcp.shinto the image so consumer projects don't carry a copy #87 and [BUG] patch-playwright-mcp misses mid-session plugin cache updates #98, and it still needspatch-playwright-mcpre-run on every SessionStart. - Tokens and speed. agent-browser's accessibility-tree snapshots with
@eNrefs are much more compact than the MCP's snapshot output, and one CLI call replaces several tool round trips. - No coverage lost for ad-hoc work. In practice agent-browser covered everything the MCP was used for: viewport and DPR emulation (
set viewport <w> <h> 2), isolated sessions,eval --stdin,batch, network routes and HAR, console and page errors, React render recording, and axe audits.
Review checklist (2026-11-25)
- Over the two months, agents used agent-browser for interactive browser work without falling back to the MCP. If there were fallbacks, list what was missing.
- Nothing in the consuming projects depends on
mcp__plugin_playwright_*tools (skills, rules, CLAUDE.md, hooks). - agent-browser works in both
defaultandsandboxtargets, including under theclaude-sandboxfirewall.
Removal scope (only if the review passes)
- Drop
playwright@claude-plugins-officialfromPLUGINSinclaude-code/.devcontainer/init-plugins.sh. - Drop the
patch-playwright-mcpSessionStart hook frommanaged-settings.json, and the script and its image install, if nothing else uses it. - Existing containers keep the plugin. Per claude-code template: plugins added to init-plugins.sh never reach existing containers unless the script is run by hand #171, removing it from
init-plugins.shdoesn't uninstall it from the persisted~/.claudevolume. Add an explicitclaude plugin uninstall playwright@claude-plugins-officialstep, or document a one-time command for consumers. - README: update the baked-in plugin list and the Playwright notes.
- Keep
PLAYWRIGHT_SKIP_BROWSER_DOWNLOADandPLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH. The@playwright/testand vitest fallback still needs them.
Context
Came out of a session in a private project that verified a production image-delivery change entirely through browser automation (1,400+ image renders across widths and DPRs, UI behaviour checks). All of it was done with the Playwright MCP's browser_run_code_unsafe, and all of it would have worked with agent-browser.
Activity