Orphaned headless Chrome Helpers spin at high CPU under agent-browser-chrome temp profile

Author: tianxiaochannel-oss88Created May 17, 2026Updated Sep 17, 2026

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 Helper child processes were each using about 85-100% CPU.
  • Total load was approximately 5-6 saturated CPU cores.
  • The stuck processes did not disappear when the checking agent/session ended; they had to be manually closed/killed.
  • ai.openclaw.gateway was restarted and was listening again on port 18789; this did not automatically clean up the orphaned Chrome processes.
  • com.openclaw.keepawake was running.
  • iCloud-related processes were checked and not involved: fileproviderd, bird, and cloudd were all at 0% 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-swiftshader when it is not needed, since this incident involved --headless=new --enable-unsafe-swiftshader and multiple helpers spinning CPU.
  • Document a safe cleanup command/workaround for stale agent-browser-chrome-* processes.

Source: vercel-labs/agent-browser