# NousResearch/hermes-agent · Handling RuntimeError from Path.expanduser in agent

## Open now

- Nothing open on GitHub.

Multiple bug reports and fixes addressing an unhandled RuntimeError raised by Path.expanduser() when $HOME is unset or a nonexistent user is referenced, causing agent crashes in subdirectory hint loading.

## TL;DR

- 7 member(s): 0 open issue(s), 2 closed issue(s), 0 open PR(s), 0 merged PR(s), 5 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_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.26`: 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

- #43963: \[Bug\]: _add_path_candidate crashes the agent turn on ~user expanduser() RuntimeError (except misses RuntimeError)
- #45401: bug: subdirectory_hints.py crashes with RuntimeError when $HOME is unset

## Prior & competing PRs

- **#43970: Fix _add_path_candidate crash on ~user expanduser() RuntimeError**. closed without merge · fix tier `suggested`
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#29433`, `#43963`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#44056: fix(agent): catch RuntimeError from expanduser() with ~nonexistent_user (#43963)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#29433`, `#43963`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#44095: fix(agent): catch RuntimeError from expanduser() in subdirectory hint loader**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#43970`, `#44056`
- **#45430: fix(agent): catch RuntimeError from Path.expanduser/home when $HOME is unset**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#29433`
- **#45468: fix(agent): catch RuntimeError from Path.expanduser/home when $HOME is unset**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#29433`

## Fix status

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