# NousResearch/hermes-agent · Docker/terminal venv PATH loss in login shells

## Open now

- 2 issues, 4 PRs open on GitHub.
- #56634: \[Bug\]: terminal tool's bash -l session snapshot loses venv PATH on Debian-based images (/etc/profile resets it before /etc/profile.d/)
- #66642: \[Bug\]: Terminal tool loses the venv from PATH — the login-shell session snapshot resets it
- PR #56642: fix(terminal): preserve venv PATH in login-shell snapshot on Debian
- PR #64849: fix(docker): restore the venv on PATH for login shells on Debian
- PR #87738: fix(terminal): restore venv PATH before the login-shell snapshot dump
- PR #130801: fix(terminal): retry unresolved Hermes launcher discovery

A cluster of bugs and fixes centered on the Python virtual environment being dropped from PATH during Docker exec sessions and login-shell snapshots, particularly on Debian-based images. Related fixes address making the hermes entrypoint accessible and preserving venv PATH across shell initialization sequences.

## TL;DR

- 12 member(s): 2 open issue(s), 3 closed issue(s), 4 open PR(s), 0 merged PR(s), 3 PR(s) closed without merging.
- No fix has been merged to main; one or more PRs were attempted (see below).
- **Recommended:** review the prior/competing PR(s) below. A fix was attempted but not merged; your case may extend or revive that work.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `unresolved`. 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.14`: 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.

## Open related issues

- #56634: \[Bug\]: terminal tool's bash -l session snapshot loses venv PATH on Debian-based images (/etc/profile resets it before /etc/profile.d/)
- #66642: \[Bug\]: Terminal tool loses the venv from PATH — the login-shell session snapshot resets it

## Closed / duplicate issues

- #9792: \[Bug\]: hermes command not found in external interactive shells after virtualenv migration (#8226)
- #18673: \[Bug\]: hermes command not found during docker exec (requires absolute virtual environment path)
- #32619: \[Bug\]: tool execute_code no longer inherits from the machine's environment

## Prior & competing PRs

- **#23205: Fix/docker exec hermes path**. closed without merge · fix tier `suggested`
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#18674: fix(docker): expose hermes entrypoint on PATH**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`
- **#56642: fix(terminal): preserve venv PATH in login-shell snapshot on Debian**. open
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#56634`, `#29761`, `#33179`, `#29761`
  - files: `tests/tools/test_login_shell_path_preservation.py`, `tools/environments/local.py`
- **#64849: fix(docker): restore the venv on PATH for login shells on Debian**. open
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `846b14ab0`, `745c5e10a`, `#71296`, `#72197`
  - files: `Dockerfile`, `docker/profile.d/99-hermes-venv-path.sh`, `tests/docker/test_login_shell_venv_path.py`, `tests/tools/test_base_environment.py`, `tests/tools/test_daytona_environment.py`, `tests/tools/test_docker_probe_env.py`, `tests/tools/test_login_path_restore.py`, `tests/tools/test_login_shell_path_dropin.py`, `tools/environments/base.py`, `tools/environments/docker.py`, `tools/environments/local.py`
- **#66902: fix(tools): preserve active venv on PATH across login-shell snapshots (#66642)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#66642`
- **#87738: fix(terminal): restore venv PATH before the login-shell snapshot dump**. open
  - maintainer direction: category `stale_abandoned`; implication `active`
  - files: `tests/tools/test_login_shell_path_preservation.py`, `tools/environments/local.py`
- **#130801: fix(terminal): retry unresolved Hermes launcher discovery**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `26f5c6184cd62ff6aa0fc2e70e5314bea85a96aa`
  - files: `tests/tools/test_hermes_bin_retry.py`, `tools/environments/local.py`

## Fix status

- No merged fix on record.
- Subsystem: `environments`
