# NousResearch/hermes-agent · Profile pairing grants writing to wrong env file

## Open now

- 0 issues, 2 PRs open on GitHub.
- PR #77510: fix(gateway): scope pairing allowlist writes to profile
- PR #77519: fix(gateway): profile-scoped allowlist env writes for pairing grants (#77490)

A bug where pairing grant allowlist entries are written to the root .env file instead of the profile-specific .env file under multiplexing. Multiple fixes and a bug report address scoping these writes correctly to the active profile.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 2 open PR(s), 1 merged PR(s), 0 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

- #77490: \[Bug\]: Profile pairing grants write to root .env instead of profile-specific .env under multiplexing

## 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`
- **#77510: fix(gateway): scope pairing allowlist writes to profile**. open
  - maintainer direction: category `silent_close`; implication `active`
  - files: `gateway/pairing.py`, `hermes_cli/config.py`, `tests/gateway/test_pairing_allowlist_bypass.py`
- **#77519: fix(gateway): profile-scoped allowlist env writes for pairing grants (#77490)**. open
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#88441`
  - files: `gateway/pairing.py`, `tests/gateway/test_pairing.py`

## 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: `gateway`
