# NousResearch/hermes-agent · Bug fix: preserve skill command cache on scan failure

## Open now

- 1 issue, 3 PRs open on GitHub.
- #18659: \[Bug\]: scan_skill_commands unconditionally clears _skill_commands before try block, silently loses all skills on scan failure
- PR #18668: fix(skills): preserve command cache on scan setup failure
- PR #18720: fix: preserve skill command cache on scan failure in scan_skill_commands()
- PR #74511: fix(skills): preserve _skill_commands cache when scan fails (#18659)

A bug was identified where scan_skill_commands() unconditionally clears the _skill_commands cache before the try block, silently losing all skills if the scan fails. These issues and PRs address preserving the existing cache when a scan error occurs.

## TL;DR

- 8 member(s): 1 open issue(s), 1 closed issue(s), 3 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_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.23`: 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

- #18659: \[Bug\]: scan_skill_commands unconditionally clears _skill_commands before try block, silently loses all skills on scan failure

## Closed / duplicate issues

- #18656: scan_skill_commands: unconditionally clears _skill_commands before try block

## Prior & competing PRs

- **#18669: fix(agent): preserve skill commands on scan failure + log diagnostic warning**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#18669`, `#18659`, `#2868`, `#22514`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#22514: fix(skill_commands): preserve cache when scan fails**. closed without merge · fix tier `suggested`
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#18668`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#18668: fix(skills): preserve command cache on scan setup failure**. open
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#22514`, `#18720`
  - files: `agent/skill_commands.py`, `tests/agent/test_skill_commands.py`
- **#18717: fix(agent): preserve _skill_commands cache on scan failure; cap rglob fallback (#18659, #18675)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#18668`, `#18677`, `#18659`, `#18675`
- **#18720: fix: preserve skill command cache on scan failure in scan_skill_commands()**. open
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#18668`, `#18659`
  - files: `agent/skill_commands.py`, `tests/agent/test_skill_commands.py`
- **#74511: fix(skills): preserve _skill_commands cache when scan fails (#18659)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `agent/skill_commands.py`, `tests/agent/test_skill_commands.py`

## Fix status

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