Skip to content

fix: use subprocess HOME for ~ expansion in skill config values#12331

Closed
kagura-agent wants to merge 1 commit intoNousResearch:mainfrom
kagura-agent:fix/skill-config-home-expansion
Closed

fix: use subprocess HOME for ~ expansion in skill config values#12331
kagura-agent wants to merge 1 commit intoNousResearch:mainfrom
kagura-agent:fix/skill-config-home-expansion

Conversation

@kagura-agent
Copy link
Copy Markdown
Contributor

Fixes #12260

resolve_skill_config_values() used os.path.expanduser() to expand ~ in skill config defaults, which resolves against the Python process's HOME (e.g. /opt/data in containers) rather than the subprocess HOME.

Changes:

  • Added _expand_home() helper that uses get_subprocess_home() from hermes_constants
  • Updated both call sites in resolve_skill_config_values() (skill dirs + config values)
  • Falls back to os.path.expanduser() when get_subprocess_home() returns None
  • Added 5 tests covering the helper and integration with resolve_skill_config_values()

@mxnstrexgl
Copy link
Copy Markdown

✓ Automated scan: no security concerns. Path expansion fix.

…Research#12260)

resolve_skill_config_values() was using os.path.expanduser() which
resolves ~ against the Python process HOME (/opt/data in containers).
Replace with a helper that uses get_subprocess_home() so ~ expands to
the correct per-profile home directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kagura-agent kagura-agent force-pushed the fix/skill-config-home-expansion branch from aa30d34 to 434ff17 Compare April 19, 2026 02:14
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder tool/skills Skills system (list, view, manage) labels Apr 23, 2026
@alt-glitch
Copy link
Copy Markdown
Collaborator

Likely duplicate of #12736 — both fix ~ expansion in skill config to use subprocess HOME instead of Python process HOME (fixes #12260). Also see #12284.

@kagura-agent
Copy link
Copy Markdown
Contributor Author

Closing in favor of #12736 which takes a cleaner approach by adding expand_hermes_path to hermes_constants.py — better than my local helper. Thanks @alt-glitch for flagging the duplicate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: resolve_skill_config_values() uses wrong HOME semantics for ~ expansion — expands against Python process HOME instead of Hermes subprocess HOME

3 participants