# NousResearch/hermes-agent · orphaned browser daemon cleanup and process leaks

## Open now

- Nothing open on GitHub.

Multiple issues and fixes addressing orphaned agent-browser daemon processes and Chromium trees that accumulate due to timeouts, force-closed sessions, or startup failures. Includes detection, reaping logic, idle timeouts, and a bug in the glob pattern used to identify orphaned sessions.

## TL;DR

- 8 member(s): 0 open issue(s), 3 closed issue(s), 0 open PR(s), 3 merged PR(s), 2 PR(s) closed without merging.
- A fix was merged to main in PR #13155. Verify it addresses your case.
- **Recommended:** read PR #13155 (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: `partially_resolved` · deciding PR(s): `pr-13155,pr-94183`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): 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.20`: 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

- #13081: \[Bug\]: \`_reap_orphaned_browser_sessions()\` glob pattern doesn't match actual socket directories, causing daemon startup failure
- #13793: Orphaned agent-browser daemons accumulate after force-closed sessions, eventually freezing CLI input
- #68139: browser_tool: command timeout leaks the spawned agent-browser daemon + Chromium tree (long-lived gateway accumulates orphans until host OOM)

## Prior & competing PRs

- **#13155: fix(tools): reap orphaned cloud browser daemons with hermes session prefix**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `tools/browser_tool.py`
  - fix hunks:
  - `tools/browser_tool.py`

    ```diff
    @@ -582,6 +582,8 @@ def _reap_orphaned_browser_sessions():
         socket_dirs = glob.glob(pattern)
         # Also pick up CDP sessions
         socket_dirs += glob.glob(os.path.join(tmpdir, "agent-browser-cdp_*"))
    +    # Also pick up cloud-provider sessions (browser-use/browserbase/firecrawl)
    +    socket_dirs += glob.glob(os.path.join(tmpdir, "agent-browser-hermes_*"))
     
         if not socket_dirs:
             return
    ```
- **#94183: fix(browser): suspect-session recycle + wedged-daemon tree-kill on timeout (#85125 3b-browser/4c)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `tests/tools/test_browser_open_timeout.py`, `tests/tools/test_browser_suspect_recycle.py`, `tools/browser_tool.py`
- **#94188: refactor(deadline): consolidate site-local tree-kills onto agent.deadline.kill_process_tree (#85125 4d)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `hermes_cli/_subprocess_compat.py`, `tests/agent/test_treekill_consolidation.py`, `tests/tools/test_browser_npx_warmup.py`, `tools/browser_tool.py`, `tools/code_execution_tool.py`
- **#13084: fix(tools): reap orphaned cloud browser daemons with hermes session p…**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#13155`, `#13155`
- **#68220: fix(browser): tree-kill orphaned agent-browser daemon on command timeout (#68139)**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#94183`, `#85125`, `#68139`, `#94188`

## Fix status

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