# NousResearch/hermes-agent · CLI profile override applying twice or incorrectly

## Open now

- 1 issue, 2 PRs open on GitHub.
- #66907: Default-profile gateway hijacked to active_profile: _apply_profile_override runs twice under python -m (flag stripped on first pass)
- PR #67048: fix: add PID-scoped run-once sentinel to _apply_profile_override (#66907)
- PR #75109: fix(cli): prevent python -m main double-import profile rehoming

These issues and fixes center on _apply_profile_override being called more than once or behaving incorrectly under 'python -m' invocation, causing profile context variables and HERMES_HOME to be set wrong. Solutions include PID-scoped sentinels, ContextVar handling, and double-import prevention.

## TL;DR

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

## Open related issues

- #66907: Default-profile gateway hijacked to active_profile: _apply_profile_override runs twice under python -m (flag stripped on first pass)

## Prior & competing PRs

- **#67048: fix: add PID-scoped run-once sentinel to _apply_profile_override (#66907)**. open
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `d71033a4077a6dfdcdb42c9e9eeab4c41e4a7012`, `e4ea94981445`, `#53954`, `#53955`, `#67048`, `#67133`, `#72574`, `#75109`, `#76801`, `#76808`, `#66907`, `#72543`, `#76704`, `#76705`, `#374151`
  - files: `hermes_cli/main.py`, `tests/hermes_cli/test_apply_profile_override.py`
- **#75109: fix(cli): prevent python -m main double-import profile rehoming**. open
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#97174`
  - files: `hermes_cli/main.py`, `tests/hermes_cli/test_main_module_alias.py`

## Fix status

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