anomalyco / anomalyco/opencode
[FEATURE]:Configurable Playwright browser launch options for Apple Silicon / Metal acceleration
@kitlangton is already working on this.
Since Jul 24, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.