Skip to content

skills.external_dirs relative paths depend on process cwd instead of config location #9949

@NewTurn2017

Description

@NewTurn2017

Bug Description

Relative entries in skills.external_dirs are resolved with Path(...).resolve() against the current working directory, not against the config file / HERMES_HOME.

Affected files / lines

  • agent/skill_utils.py:207-223

Why this is a bug

A valid relative config works or breaks depending on where Hermes was launched from. This silently hides external skill directories in CLI/gateway/cron contexts.

Minimal Reproduction

  1. Create a temporary HERMES_HOME/.hermes/config.yaml containing:
    skills:
      external_dirs:
        - ../shared-skills
  2. Create the expected directory next to that temp home: ../shared-skills
  3. Set HERMES_HOME to that temp home, then chdir() somewhere else (for example the repo root)
  4. Call get_external_skills_dirs()

Observed result:

  • resolved_dirs == []
  • the expected directory exists, but it is skipped because resolution is done from the process cwd

Expected Behavior

Relative skills.external_dirs entries should be resolved consistently relative to the active config location (or a documented base such as HERMES_HOME), not the caller's cwd.

Actual Behavior

The same config can succeed or fail depending on startup directory.

Suggested Investigation Direction

Resolve relative paths against the loaded config file path (or the active Hermes home), while still supporting absolute paths and env-var expansion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/configConfig system, migrations, profilescomp/agentCore agent loop, run_agent.py, prompt buildertool/skillsSkills system (list, view, manage)type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions