Skip to content

[FEATURE]:Configurable Playwright browser launch options for Apple Silicon / Metal acceleration #38669

Description

@hldz-top

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The built-in Playwright browser tools (browser_navigate, browser_click, etc.) launch Chromium with hardcoded arguments. There is currently no opencode.jsonc config key to override them.

On Apple Silicon Macs (M1–M5), the default launch misses key performance flags:

--headless=new — new headless mode with full GPU pipeline support
--use-gl=angle / --use-angle=metal — force Metal API for rendering
--disable-dev-shm-usage — avoid /dev/shm bottleneck on machines with large RAM
Without these, Playwright workloads waste CPU/WindowServer resources and underutilize the GPU.

Proposed config
{
"playwright": {
"launchOptions": {
"headless": true,
"args": [
"--headless=new",
"--use-gl=angle",
"--use-angle=metal",
"--disable-dev-shm-usage"
]
}
}
}
Alternatively, a simpler escape hatch:

{
"playwright": {
"extraLaunchArgs": ["--headless=new", "--use-angle=metal"]
}
}
Use case
Running browser automation in headless mode on M-series Macs while keeping GPU acceleration via Metal. Reduces CPU load, WindowServer overhead, and improves throughput — especially important for overnight batch agents.

Workaround
Currently using a custom MCP server with a user-owned Playwright instance as a replacement. Native support would eliminate that overhead.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions