Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile
Summary
agent-browser can leave a headless Google Chrome instance running under a temporary profile path such as ~/.openclaw/tmp/agent-browser-chrome-7d9a6155-... after the calling agent/session has finished or been interrupted. The orphaned Chrome Helper children can spin at ~85-100% CPU each, consuming roughly 5-6 full CPU cores until manually killed.
This looks similar to the previously closed #1113, but in this case the most visible symptom was sustained high CPU from the orphaned headless Chrome helpers rather than normal Chrome launch blocking.
Environment
- OS: macOS 26.5, arm64
- Chrome: Google Chrome 148.0.7778.168
- agent-browser: 0.26.0
- OpenClaw: 2026.5.12 (f066dd2)
- Node: v24.15.0
- Integration path: OpenClaw/Codex invoking
agent-browser
Evidence observed
- Process/profile path included:
/Users/tianxiao/.openclaw/tmp/agent-browser-chrome-7d9a6155-...
- Chrome command line included:
--headless=new --enable-unsafe-swiftshader
- Multiple
Google Chrome Helperchild processes were each using about85-100%CPU. - Total load was approximately
5-6saturated CPU cores. - The stuck processes did not disappear when the checking agent/session ended; they had to be manually closed/killed.
ai.openclaw.gatewaywas restarted and was listening again on port18789; this did not automatically clean up the orphaned Chrome processes.com.openclaw.keepawakewas running.- iCloud-related processes were checked and not involved:
fileproviderd,bird, andclouddwere all at0%CPU.
After manual cleanup, ps no longer showed agent-browser-chrome-* processes and ~/.openclaw/tmp no longer had agent-browser-chrome-* temp directories.
Expected behavior
When the calling CLI/agent/session exits, is interrupted, or loses control of the browser session, all Chrome processes launched by agent-browser should be terminated and the temporary agent-browser-chrome-* profile directory should be removed or marked for cleanup.
Actual behavior
The headless Chrome process tree remained alive after the caller was done/interrupted. Several Chrome Helper child processes kept spinning at high CPU until manually killed.
Why this matters
On macOS this can quietly burn multiple full CPU cores in the background, drain battery, heat the machine, and make it look like OpenClaw/Codex is still doing work even after the browser task has ended.
Possible fixes / suggestions
- Ensure the CLI/daemon owns and tears down the whole Chrome process group on normal exit, interrupt, timeout, and parent disconnect.
- Add a watchdog/lease for temp profiles named
agent-browser-chrome-*so stale sessions can be detected and cleaned. - Consider disabling or making configurable
--enable-unsafe-swiftshaderwhen it is not needed, since this incident involved--headless=new --enable-unsafe-swiftshaderand multiple helpers spinning CPU. - Document a safe cleanup command/workaround for stale
agent-browser-chrome-*processes.
Source: vercel-labs/agent-browser