# NousResearch/hermes-agent · Secret scope and env var preservation fixes

## Open now

- Nothing open on GitHub.

These items address bugs and fixes related to environment variable handling in scoped secrets and operator allowlist env vars, specifically preventing silent deletion of operator env vars and ensuring scoped secrets do not leak or incorrectly borrow from 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

- #119539: \[Bug\] \`strip_profile_gate_env\` deletes operator env vars by name *shape* (\`_ALLOWED_\`), silently breaking routed-profile \`no_agent\` cron scripts

## 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)
- **#119547: fix(profiles): preserve operator allowlist env**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#120128`, `#119539`

## Fix status

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