# NousResearch/hermes-agent · USER_OWNED_EXCLUDE incorrectly filtering nested directories

## Open now

- Nothing open on GitHub.

A bug where USER_OWNED_EXCLUDE entries are applied at all directory levels during profile distribution copy, causing nested directories with matching names to be silently dropped. Multiple fixes scope this exclusion to the root level only.

## TL;DR

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

- #31033: \[Bug\]: hermes profile install --force deletes nested distribution-owned files under skills/<category>/hermes-agent/
- #37954: \[Bug\]: distribution install/update silently drops nested directories whose names match USER_OWNED_EXCLUDE entries (bin, logs, cache, etc.)

## Prior & competing PRs

- **#31123: fix(cli): scope USER_OWNED_EXCLUDE to root in profile distribution copy**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `e53b74c39450d85d210ba06e69be5022278eb974`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#37958: fix(profile-dist): restrict USER_OWNED_EXCLUDE copytree ignore to root level**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `e53b74c39450d85d210ba06e69be5022278eb974`, `#37954`, `#37998`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#37998: fix: only apply USER_OWNED_EXCLUDE at staged-tree root in copytree (#37954)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `e53b74c39450d85d210ba06e69be5022278eb974`, `#37958`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#41651: fix: batch salvage of 10 low-risk fixes (@islam666)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/context_compressor.py`, `agent/image_routing.py`, `agent/model_metadata.py`, `gateway/platforms/weixin.py`, `hermes_cli/gateway.py`, `hermes_cli/profile_distribution.py`, `hermes_cli/profiles.py`, `hermes_cli/web_server.py`, `plugins/google_meet/meet_bot.py`, `plugins/model-providers/xiaomi/__init__.py`, `providers/base.py`, `run_agent.py`, `scripts/release.py`, `tests/agent/test_custom_providers_vision.py`, `tests/agent/test_model_metadata.py`, `tests/gateway/test_weixin_typing.py`, `tests/hermes_cli/test_profile_distribution.py`, `tests/hermes_cli/test_systemd_optional_directives.py`, `tests/hermes_cli/test_web_server.py`, `tests/run_agent/test_infinite_compaction_loop.py` (+2 more)
- **#38063: fix(dist): stop USER_OWNED_EXCLUDE from filtering nested directories during install**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#41651`

## Fix status

- Merged to main in PR #41651 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-06-08`.
- Subsystem: `hermes_cli`
