# NousResearch/hermes-agent · Profile-scoped secrets must not borrow os.environ

## Open now

- Nothing open on GitHub.

These items address a bug where profile-scoped secret reads that encounter errors incorrectly borrow from \`os.environ\`, potentially taking credentials from the default profile in multiplexed environments. The work focuses on ensuring scoped reads close without silently borrowing unintended credentials — a behavior the members describe as \`failed\` reads falling back to \`os.environ\`.

## TL;DR

- 3 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 1 PR(s) closed without merging.
- A fix was merged to main in PR #120128. Verify it addresses your case.
- **Recommended:** read PR #120128 (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-120128`. 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.67`: 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

- #119279: \[Bug\]: Profile-scoped secret reads fall back to os.environ on any failure, borrowing the default profile's credentials under multiplex

## Prior & competing PRs

- **#120128: fix(secret-scope): bound scopes carry their home; foreign-home misses fail closed, setup raises release tokens, readers never borrow os.environ**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/auxiliary_client.py`, `agent/secret_scope.py`, `cron/scheduler.py`, `gateway/kanban_watchers_dispatcher.py`, `gateway/pairing.py`, `gateway/run.py`, `gateway/run_turn.py`, `gateway/session.py`, `hermes_cli/config.py`, `hermes_cli/kanban_db_dispatch.py`, `hermes_cli/nous_auth_keepalive.py`, `hermes_cli/web_routers/audio.py`, `hermes_cli/web_server_mcp.py`, `hermes_cli/web_server_profiles.py`, `tests/agent/test_secret_scope.py`, `tests/agent/test_secret_scope_tier1_migration.py`, `tests/gateway/test_multiplex_pairing_stores.py`, `tests/gateway/test_proxy_mode.py`, `tests/gateway/test_session.py`, `tests/hermes_cli/test_audio_router_scope.py` (+16 more)
- **#119280: fix(scope): failed profile-scoped secret reads must not borrow os.environ**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `b88b3de6e3`, `#120128`

## Fix status

- Merged to main in PR #120128 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-23`.
