# NousResearch/hermes-agent · fail-open error handling for managed env loading

## Open now

- 1 issue, 2 PRs open on GitHub.
- #73401: _apply_managed_env() can crash startup with an uncaught PermissionError, contradicting its own documented fail-open contract
- PR #73418: fix(env): keep managed scope permission errors fail-open
- PR #73485: fix(cli): catch PermissionError in _apply_managed_env() to honor fail-open contract

Multiple fixes and a related bug report address uncaught PermissionErrors in managed .env loading that could crash startup, contradicting the documented fail-open behavior. The changes wrap the relevant code paths in try/except blocks to restore the intended contract.

## TL;DR

- 6 member(s): 1 open issue(s), 0 closed issue(s), 2 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_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.33`: 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

- #73401: _apply_managed_env() can crash startup with an uncaught PermissionError, contradicting its own documented fail-open contract

## Prior & competing PRs

- **#73408: fix(env_loader): wrap managed .env load in fail-open try/except**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#73418`
- **#73413: fix(cli): catch PermissionError in _apply_managed_env() (#73401)**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#73408`, `#73401`
- **#73418: fix(env): keep managed scope permission errors fail-open**. open
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `8b2e7000f`, `89ae4e6c3`, `#73413`, `#73401`, `#73418`
  - files: `hermes_cli/env_loader.py`, `tests/hermes_cli/test_managed_scope_env.py`
- **#73485: fix(cli): catch PermissionError in _apply_managed_env() to honor fail-open contract**. open
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `c7f3688e02ed`, `#73401`, `#73413`, `#73418`, `#73837`, `#73408`, `#73485`, `#374151`
  - files: `hermes_cli/env_loader.py`
- **#73837: fix(config): keep managed env loading fail-open**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#73418`

## Fix status

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