# NousResearch/hermes-agent · Symlink cycles causing infinite loops in skill file walking

## Open now

- 2 issues, 2 PRs open on GitHub.
- #18809: \[Bug\]: os.walk(followlinks=True) in iter_skill_index_files may infinite-loop on cyclic symlinks
- #47659: build_skills_system_prompt: self-referencing symlinks cause infinite recursion in os.walk(followlinks=True)
- PR #18815: fix(skills): prevent infinite loop on cyclic symlinks in iter_skill_index_files
- PR #20658: fix(agent): detect symlink cycles in iter_skill_index_files

A bug was identified where os.walk(followlinks=True) in iter_skill_index_files can infinite-loop when encountering cyclic or self-referencing symlinks. Multiple fixes and approaches are proposed to detect or reject symlink cycles.

## TL;DR

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

- #18809: \[Bug\]: os.walk(followlinks=True) in iter_skill_index_files may infinite-loop on cyclic symlinks
- #47659: build_skills_system_prompt: self-referencing symlinks cause infinite recursion in os.walk(followlinks=True)

## Prior & competing PRs

- **#18815: fix(skills): prevent infinite loop on cyclic symlinks in iter_skill_index_files**. open
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#18809`, `#7634`
  - files: `agent/skill_utils.py`, `scripts/release.py`, `tests/agent/test_skill_utils.py`
- **#20658: fix(agent): detect symlink cycles in iter_skill_index_files**. open
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#18815`
  - files: `agent/skill_utils.py`, `tests/agent/test_skill_utils.py`
- **#47775: fix(agent): detect symlink cycles in iter_skill_index_files to prevent infinite recursion**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#18815`, `#18815`

## Fix status

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