Skip to content

fix(browser): rename AGENT_BROWSER_CHROME_FLAGS to AGENT_BROWSER_ARGS - #26028

Closed
Null-Phnix wants to merge 1 commit into
NousResearch:mainfrom
Null-Phnix:fix/browser-env-var-mismatch-23496
Closed

fix(browser): rename AGENT_BROWSER_CHROME_FLAGS to AGENT_BROWSER_ARGS#26028
Null-Phnix wants to merge 1 commit into
NousResearch:mainfrom
Null-Phnix:fix/browser-env-var-mismatch-23496

Conversation

@Null-Phnix

Copy link
Copy Markdown

Summary

The sandbox-bypass injection in _run_browser_command wrote AGENT_BROWSER_CHROME_FLAGS, but agent-browser (the Rust binary) reads AGENT_BROWSER_ARGS. This made the --no-sandbox workaround for root/AppArmor-restricted systems a silent no-op (see #23496 for full repro).

Fix

Rename the env var from AGENT_BROWSER_CHROME_FLAGS to AGENT_BROWSER_ARGS in both the guard check and the assignment. No other code in the repo references AGENT_BROWSER_CHROME_FLAGS, so this is a complete fix.

Verification

  • grep -r AGENT_BROWSER_CHROME_FLAGS returns no results post-fix.
  • grep -r AGENT_BROWSER_ARGS confirms the var is used consistently.
  • The detection logic (root via os.geteuid(), AppArmor via /proc/sys/kernel/apparmor_restrict_unprivileged_userns) is unchanged — only the env var name it writes is corrected.

Fixes #23496

The sandbox-bypass injection in _run_browser_command wrote
AGENT_BROWSER_CHROME_FLAGS, but agent-browser (the Rust binary)
reads AGENT_BROWSER_ARGS. This made the --no-sandbox workaround
for root/AppArmor-restricted systems a silent no-op.

Fixes #23496
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists tool/browser Browser automation (CDP, Playwright) labels May 15, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #24198 (and #25998, #23532, #24821) — all fix the same AGENT_BROWSER_CHROME_FLAGSAGENT_BROWSER_ARGS env var rename for #23496. The maintainer-authored #25988 appears to be the canonical fix.

@Null-Phnix

Copy link
Copy Markdown
Author

Closing as duplicate of existing fix. Thanks for the pointer, @alt-glitch. Will look for other issues to contribute to.

@Null-Phnix Null-Phnix closed this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Medium — degraded but workaround exists tool/browser Browser automation (CDP, Playwright) type/bug Something isn't working

Projects

None yet

2 participants