Browser detection and executable path resolution fixes
NousResearch/hermes-agent · cluster 15697 · agent
Data as of
3 open items. Fix merged in #19595. Check it covers your case.
The short answer
- Known?
- Yes. 15 related items grouped here, 2 issues already closed.
- Fix event
- A fix was merged to main in PR #19595. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
partially resolved, deciding PR #33184. That is separate from the fix event. - Still open
- 2 issues and 1 PR.
Next step: read #19595, then check whether your report is one of the 2 still open.
Read #19595Pick up a Lab taskMultiple bugs and fixes around how Chromium/Chrome is detected across macOS app-bundles, Docker images, and custom executable paths. Covers the availability check logic, AGENT_BROWSER_EXECUTABLE_PATH propagation, and bundled vs. system browser discovery.
Open issues2
Open PRs1
- PR#66131fix(browser): propagate browser.executable_path config to agent-browser subprocess (#66111)
Fixes on record
-
#19595 fix: _chromium_installed() honors AGENT_BROWSER_EXECUTABLE_PATH and system Chrome
files:
tools/browser_tool.pyShow the diff
-
tools/browser_tool.py@@ -2757,17 +2757,40 @@ def _chromium_search_roots() -> List[str]: def _chromium_installed() -> bool: """Return True when a usable Chromium (or headless-shell) build is on disk. + Checks, in order: + + 1. ``AGENT_BROWSER_EXECUTABLE_PATH`` env var — the official way to point + agent-browser at a pre-installed Chrome/Chromium. + 2. System Chrome/Chromium in PATH (``google-chrome``, ``chromium-browser``, + ``chrome``). + 3. Playwright's browser cache (current logic) — directories containing + ``chromium-*`` or ``chromium_headless_shell-*``. + agent-browser (0.26+) downloads Playwright's chromium / headless-shell - builds into ``PLAYWRIGHT_BROWSERS_PATH`` and won't start without them. - When the CLI is present but no browser build is, the first browser tool - call hangs for the full command timeout (often ~30s each) before - surfacing a useless error. Guarding the tool behind this check prevents - advertising a capability that will fail at runtime. + builds into ``PLAYWRIGHT_BROWSERS_PATH`` and won't start without at least + one of the three above being present. Without a browser binary the CLI + hangs on first use until the command timeout fires (often ~30s). Guarding + the tool behind this check prevents advertising a capability that will + fail at runtime. """ global _cached_chromium_installed if _cached_chromium_installed is not None: return _cached_chromium_installed + # 1. AGENT_BROWSER_EXECUTABLE_PATH — explicit user-configured browser + ab_path = os.environ.get("AGENT_BROWSER_EXECUTABLE_PATH", "").strip() + if ab_path: + if os.path.isfile(ab_path) or shutil.which(ab_path): + _cached_chromium_installed = True + return True + + # 2. System Chrome/Chromium in PATH (common names) + system_chrome = shutil.which("google-chrome") or shutil.which("chromium-browser") or shutil.which("chrome") + if system_chrome: + _cached_chromium_installed = True + return True + + # 3. Playwright browser cache (legacy — chromium-* / chromium_headless_shell-* dirs) for root in _chromium_search_roots(): if not root or not os.path.isdir(root): continue
-
-
#33184 fix(docker): discover agent-browser Chromium binary at boot
files:
docker/stage2-hook.sh
8 PRs closed without merging
From the close comments: superseded by another PR 2 · closed without comment 1 · done elsewhere 1 · merged via another change 1 · stale or abandoned 1 · other 2
- #15908 fix(docker): set AGENT_BROWSER_EXECUTABLE_PATH to Playwright's Chromium · stale or abandoned
- #18635 fix(install): implement dynamic browser bin discovery for agent-browser · closed without comment
-
#19298 fix: _chromium_installed() ignores AGENT_BROWSER_EXECUTABLE_PATH and system Chrome · merged via another change →
#19595 -
#19457 fix(browser): detect configured system chrome · done elsewhere →
45fd451,#30161,#33408 -
#48185 fix(tools): detect macOS app-bundle Chrome in browser availability gate · other →
97888fe
Closed issues · 2
How this cluster was grouped
-
Link evidence (
partly structural links): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text. - Members outside that structural core may belong to a different underlying problem.
-
Pairwise link density
0.12: 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 Lab