fix: follow symlinks when scanning for SKILL.md#9253
Closed
rexliu1912-star wants to merge 1 commit into
Closed
Conversation
Python 3.11's Path.rglob() does not follow symlinks into directories.
This causes symlinked skill directories to be invisible to the scanner.
Add _rglob_skills() helper using os.walk(followlinks=True) to replace
three rglob('SKILL.md') calls in _find_all_skills(), skills_categories(),
and skill_view().
Fixes: 11 symlinked skills from ~/clawd/skills/ were not registered.
This was referenced Apr 22, 2026
Collaborator
jankadlecek
added a commit
to jankadlecek/hermes-agent
that referenced
this pull request
May 24, 2026
OpenAI's "Enable device code authorization for Codex" toggle in ChatGPT Settings is broken/missing for many account types since early 2026 (openai/codex NousResearch#9253, NousResearch#9282, NousResearch#9327, NousResearch#9418). Hermes dashboard's KEYS → Codex LOGIN button uses device code internally, so it fails out of the box. Local `codex login` uses PKCE with a localhost callback and is unaffected, so let the operator do that login on their Mac and ship the resulting tokens to the container via a base64 env var. The bootstrap runs once when CODEX_AUTH_JSON_B64 is set AND the Hermes auth store does not yet exist on the volume. It writes both the Codex CLI shared file and the Hermes auth.json with active_provider set to "openai-codex", so Hermes's auto-detect picks Codex without needing any further dashboard interaction. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Thanks for the careful investigation and the clean patch, @rexliu1912-star! This fix was independently merged just a few days after your PR was opened. This is an automated hermes-sweeper review. The fix is already on
The @alt-glitch reference to #12624 and #14740 is consistent with this — the fix landed via that path before this PR could be merged. Closing as implemented on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Python 3.11
Path.rglob()does not follow symlinks into directories. When skill directories are symlinked (e.g.,~/.hermes/skills/clawd-imports/rex-ink → ~/clawd/skills/rex-ink), they are completely invisible to the skill scanner.In my setup, 11 symlinked skills from
~/clawd/skills/were not registered — only real directories were found.Fix
Add a
_rglob_skills()helper that usesos.walk(followlinks=True)instead ofrglob("SKILL.md"). Replace the 3 existingrglobcalls:_find_all_skills()(line ~535) — main skill discoveryskills_categories()(line ~665) — category listingskill_view()(line ~824) — skill lookup by nameTesting
skill_view("rex-ink")returning full contentScope
Minimal change — one new helper function, three call-site substitutions. No behavior change for non-symlinked setups.