#15690: feat(browser): add browser.args config field for custom Chrome launch flags (#14803)
agents
stale
size: XS
trusted-contributor
experienced-contributor
Cluster:
Browser Enhancements and Fixes
## Summary
Add a `browser.args` config field that lets users append custom Chrome launch flags to the built-in set. This enables hardware-accelerated WebGL, custom ANGLE backends, and other Chrome flags without patching source code.
**Example config:**
```json
{
"browser": {
"enabled": true,
"headless": true,
"args": ["--use-angle=vulkan", "--enable-features=Vulkan"]
}
}
```
## Problem
Chrome launch arguments in `launchOpenClawChrome` are entirely hardcoded. Users with GPU-capable servers (e.g. AMD Radeon iGPU with Vulkan 1.4) cannot enable hardware-accelerated WebGL because `--headless=new --disable-gpu` is always passed and there is no way to add `--use-angle=vulkan`.
## Before (on main — real environment)
### Config level
Called the real `resolveBrowserConfig` with `args: ["--use-angle=vulkan", "--enable-features=Vulkan"]`:
```
resolved config keys: enabled, evaluateEnabled, controlPort, cdpProtocol, cdpHost, cdpIsLoopback,
remoteCdpTimeoutMs, remoteCdpHandshakeTimeoutMs, color, executablePath, headless, noSandbox,
attachOnly, defaultProfile, profiles
has "args" in resolved: false
❌ FEATURE GAP CONFIRMED (config): browser.args is silently dropped by resolveBrowserConfig
```
### Launch level
Called the real `launchOpenClawChrome` → real `spawnOnce()`, captured the full Chrome args array:
```
Chrome spawn args (15): --remote-debugging-port=19999 --user-data-dir=...
--no-first-run --no-default-browser-check --disable-sync
--disable-background-networking --disable-component-update
--disable-features=Translate,MediaRouter --disable-session-crashed-bubble
--hide-crash-restore-bubble --password-store=basic --headless=new
--disable-gpu --disable-blink-features=AutomationControlled about:blank
Contains --use-angle=vulkan: false
❌ FEATURE GAP CONFIRMED (launch): no mechanism to pass custom flags to Chrome
```
## After (on fix branch)
```
✓ passes extra args through to resolved config (#14803)
✓ defaults args to empty array when omitted
✓ filters out non-string and empty args entries
Test Files 1 passed (1)
Tests 15 passed (15)
```
## Changes
- `src/config/types.browser.ts`: add `args?: string[]` to `BrowserConfig`
- `src/browser/config.ts`: add `args: string[]` to `ResolvedBrowserConfig`, parse and filter in `resolveBrowserConfig`
- `src/browser/chrome.ts`: append `resolved.args` to Chrome launch arguments in `spawnOnce()` (before the final `about:blank` positional arg)
- `src/browser/config.test.ts`: add 3 regression tests (passthrough, default empty, filter invalid entries)
- `CHANGELOG.md`: add entry
Closes #14803
Most Similar PRs
#20845: feat(browser): Add GPU configuration support for headless Chrome
by mekenthompson · 2026-02-19
68.7%
#13568: Fix browser (OpenClaw-managed) launch fail by binding remote debugg...
by singlag · 2026-02-10
65.6%
#20578: feat(browser): add proxy configuration option
by illusivejosiah · 2026-02-19
64.8%
#14944: fix(browser): prefer openclaw profile in headless/noSandbox environ...
by BenediktSchackenberg · 2026-02-12
64.5%
#15304: feat(browser): add browser-use no-relay profile driver
by rajanrengasamy · 2026-02-13
64.3%
#18823: revert(browser): remove extraArgs config
by sebslight · 2026-02-17
63.9%
#22952: fix(browser): suggest remote profile when local Chrome is not insta...
by dashed · 2026-02-21
63.7%
#11692: feat: add standalone browser CLI for Linux users
by shipitirl · 2026-02-08
62.2%
#23189: feat(browser): add custom userDataDir support for Chrome profiles
by delta8z · 2026-02-22
61.0%
#16110: feat(browser): add browser.profiles.openclaw.userDataDir config
by chengcyber · 2026-02-14
60.5%