# NousResearch/hermes-agent · Linux browser sandbox errors and --no-sandbox fixes

## Open now

- 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.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 2 PR(s) closed without merging.
- A fix was merged to main in PR #19747. Verify it addresses your case.
- **Recommended:** read PR #19747 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `resolved` · deciding PR(s): `pr-19747`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.50`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #15765: Browser automation fails on Linux root/VPS: needs --no-sandbox and chromium channel auto-detection

## Prior & competing PRs

- **#19747: fix(browser): inject --no-sandbox for root and AppArmor userns restrictions**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `tools/browser_tool.py`
  - fix hunks:
  - `tools/browser_tool.py`

    ```diff
    @@ -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
    ```
- **#21659: Fix browser_navigate failing with 'No usable sandbox!' on Ubuntu 23.10+**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `8ed2ef6f46e9642acfba57b4b8da893a574ecfd0`, `4695d2716f60da89152bdc9dfa7d96e54ea7c22e`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#15771: fix(browser): inject --no-sandbox when running as root on Linux VPS**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#19747`

## Fix status

- Merged to main in PR #19747 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-05-04`.
- Subsystem: `agent`
