hermes - 💡(How to fix) Fix Browser tool should prefer packaged agent-browser native binary when npm shim needs unavailable node

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

Local workaround tested

A local patch added native-binary fallback resolution in tools/browser_tool.py and only treats AGENT_BROWSER_ARGS as the effective browser args env var. Browser automation worked in the affected systemd gateway environment after this change.

RAW_BUFFERClick to expand / collapse

Bug description

On systemd gateway environments, PATH can expose an agent-browser npm shim while node itself is unavailable or not inherited by the service. In that case, resolving the shim leads to failures like /usr/bin/env: node: No such file or directory, even though the agent-browser package includes a platform-native binary that would work.

There is a related config/env issue: sandbox flags need to be passed via AGENT_BROWSER_ARGS, which the installed agent-browser binary reads. Older notes/logic around AGENT_BROWSER_CHROME_FLAGS can make the tool think sandbox args are configured when the binary will ignore them.

Steps to reproduce

  1. Install/use Hermes in a service environment where node_modules/.bin/agent-browser is visible.
  2. Start the gateway under systemd with a PATH that does not contain node.
  3. Attempt to use browser automation.

Actual behavior

The tool can resolve the npm shim and fail with a missing node executable, even if node_modules/agent-browser/bin/agent-browser-linux-x64 exists and is executable. Sandbox flags may also be missed if only the legacy env var is considered.

Expected behavior

  • If the PATH agent-browser is an npm shim requiring Node and node is unavailable, keep searching.
  • Prefer the packaged native binary for the current platform when available.
  • Use/inject AGENT_BROWSER_ARGS for Chrome launch flags; do not treat AGENT_BROWSER_CHROME_FLAGS as equivalent for installed agent-browser versions that ignore it.

Local workaround tested

A local patch added native-binary fallback resolution in tools/browser_tool.py and only treats AGENT_BROWSER_ARGS as the effective browser args env var. Browser automation worked in the affected systemd gateway environment after this change.

Environment

  • Hermes checkout commit: 9f182bd7b
  • OS: Ubuntu 24.04 / Linux
  • Gateway: systemd user service
  • Browser backend: local agent-browser / Chromium

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  • If the PATH agent-browser is an npm shim requiring Node and node is unavailable, keep searching.
  • Prefer the packaged native binary for the current platform when available.
  • Use/inject AGENT_BROWSER_ARGS for Chrome launch flags; do not treat AGENT_BROWSER_CHROME_FLAGS as equivalent for installed agent-browser versions that ignore it.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Browser tool should prefer packaged agent-browser native binary when npm shim needs unavailable node