# NousResearch/hermes-agent · Multiplex profile .env leaking into shared process env

## Open now

- Nothing open on GitHub.

These items concern a bug where loading a profile-scoped .env file with override=True writes that profile's variables into the shared process environment, potentially exposing credentials across profiles in multiplex mode. The group includes a bug report and two proposed fixes targeting the same issue.

## TL;DR

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

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.50`: 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

- #77562: \[Bug\]: multiplex — a turn-scoped load_hermes_dotenv() writes the active profile's entire .env into the shared process os.environ (override=True), cross-contaminating every other profile

## Prior & competing PRs

- **#101244: fix(gateway): routed multiplex profiles stop leaking .env into os.environ or borrowing default creds (#77562 #84079 #88441, salvage #77592 #84154 #100211)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `contributors/emails/[redacted:email]`, `docs/design/multiplexing-gateway.md`, `gateway/pairing.py`, `gateway/run.py`, `hermes_cli/config.py`, `hermes_cli/env_loader.py`, `tests/gateway/test_multiplex_adapter_registry.py`, `tests/gateway/test_multiplex_credential_isolation.py`, `tests/gateway/test_multiplex_pairing_stores.py`, `tests/hermes_cli/test_config_env_expansion.py`, `tests/hermes_cli/test_set_config_value.py`, `tests/test_env_loader_secret_sources.py`, `website/docs/user-guide/configuration.md`
- **#77592: fix(security): prevent multiplex dotenv credential leakage**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `0fd9218e5a1`, `#101244`
- **#77970: fix(gateway): profile-scoped .env load clobbers shared env under multiplex**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `dbb6acd333a`, `#77592`, `#77562`

## Fix status

- Merged to main in PR #101244 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-02`.
- Subsystem: `agent/secret_sources`
