fix: resolve external_dirs relative to HERMES_HOME instead of cwd (#9949)#9966
Open
Magicray1217 wants to merge 1 commit into
Open
fix: resolve external_dirs relative to HERMES_HOME instead of cwd (#9949)#9966Magicray1217 wants to merge 1 commit into
Magicray1217 wants to merge 1 commit into
Conversation
…usResearch#9949) Relative entries in skills.external_dirs were resolved against the process cwd via Path.resolve(), making them silently fail when Hermes was launched from a different directory. Resolve relative paths against get_hermes_home() for consistent behavior across CLI, gateway, and cron contexts. Absolute paths and env-var/tilde expansion are unchanged.
Collaborator
This was referenced Apr 29, 2026
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.
Summary
Fixes #9949. Relative entries in \skills.external_dirs\ were resolved against the process working directory, causing them to silently fail when Hermes was launched from a different directory.
Root Cause
\Path(expanded).resolve()\ resolves relative paths against \os.getcwd(), not against \HERMES_HOME. A config like ../shared-skills\ works when launched from \HERMES_HOME\ but silently fails from any other directory.
Fix
Resolve relative paths against \get_hermes_home()\ instead of cwd. Absolute paths, tilde expansion, and env-var expansion are unchanged.
Changes
1 file changed, 9 insertions, 1 deletion.