NousResearch/hermes-agent
Linux browser sandbox errors and --no-sandbox fixes
Cluster 15765 · agent. Data as of
Nothing open on GitHub. Fix merged in #19747 on 4 May 2026. Check it covers your case.
The short answer
0open issues
0open PRs
4items grouped
- Known?
- Yes. 4 related items grouped here, 1 issue already closed.
- Fix event
- A fix was merged to main in PR #19747. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
resolved, deciding PR #19747. That is separate from the fix event. - Still open
- Nothing open on GitHub.
These issues and PRs address browser automation failures on Linux environments (root users, VPS, Ubuntu 23.10+) caused by sandbox restrictions, proposing automatic injection of the --no-sandbox flag and related detection logic.
Open issues0
Open PRs0
Fixes on record
-
#19747 fix(browser): inject --no-sandbox for root and AppArmor userns restrictions
files:
tools/browser_tool.pyShow the diff
-
tools/browser_tool.py@@ -1482,6 +1482,34 @@ def _run_browser_command( if "AGENT_BROWSER_IDLE_TIMEOUT_MS" not in browser_env: idle_ms = str(BROWSER_SESSION_INACTIVITY_TIMEOUT * 1000) browser_env["AGENT_BROWSER_IDLE_TIMEOUT_MS"] = idle_ms + + # Inject --no-sandbox when needed (issue #15765): + # - Running as root: Chromium always refuses to start without it + # - Ubuntu 23.10+ / AppArmor systems: unprivileged user namespaces + # are restricted, causing Chromium to exit with "No usable sandbox" + # even for non-root users running under systemd or containers. + if "AGENT_BROWSER_CHROME_FLAGS" not in browser_env: + _needs_sandbox_bypass = False + if hasattr(os, "geteuid") and os.geteuid() == 0: + _needs_sandbox_bypass = True + logger.debug("browser: running as root — injecting --no-sandbox") + else: + # Detect AppArmor user namespace restrictions (Ubuntu 23.10+) + _userns_restrict = "/proc/sys/kernel/apparmor_restrict_unprivileged_userns" + try: + with open(_userns_restrict) as _f: + if _f.read().strip() == "1": + _needs_sandbox_bypass = True + logger.debug( + "browser: AppArmor userns restrictions detected — " + "injecting --no-sandbox" + ) + except OSError: + pass + if _needs_sandbox_bypass: + browser_env["AGENT_BROWSER_CHROME_FLAGS"] = ( + "--no-sandbox --disable-dev-shm-usage" + ) # Use temp files for stdout/stderr instead of pipes. # agent-browser starts a background daemon that inherits file
-
2 PRs closed without merging
From the close comments: done elsewhere 1 · merged via another change 1
Closed issues · 1
- Closed#15765Browser automation fails on Linux root/VPS: needs --no-sandbox and chromium channel auto-detection
How this cluster was grouped
-
Link evidence (
structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference. -
Pairwise link density
0.50: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36.1.00means every pair is linked.
Pick up a Lab task
Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.
Open the LabAt a glance
- Subsystem
- agent
- Merged PRs
- #19747
- Closed issues
- 1
- Attempts
- 2 PRs closed without merging
- Fix link checked
- 4 May 2026