Skip to content

[Bug]: Profile-local skills are unavailable in Dashboard/TUI/Desktop GUI because child processes use the root HERMES_HOME #40677

Closed

Description

@adriankae

Bug Description

Desktop/TUI remote profile context bug: profile-local skills are not discovered because slash workers inherit the wrong HERMES_HOME

Summary

When Hermes Desktop connects to a remote Dashboard/TUI backend running in a Docker/custom HERMES_HOME setup, profile-local skills can become unavailable in the Desktop/TUI slash-command flow even though the selected profile is active in the UI and the skill exists on disk.

The failure appears to be that long-running Dashboard/TUI processes, and especially their slash-command child workers, inherit or resolve the root/default HERMES_HOME instead of the selected profile's home. As a result, skill discovery and slash command dispatch are built from the wrong skill root.

This makes profile-local skills invisible or unloadable from the Desktop/TUI, while the same skill may be available when running Hermes directly under the intended profile context.

Environment

  • Hermes Agent running in Docker / custom HERMES_HOME layout
  • Dashboard/TUI backend exposed remotely
  • Hermes Desktop GUI connected to that remote backend
  • Multiple Hermes profiles
  • Skill exists only in a profile-local skills directory, for example:
$HERMES_HOME/profiles/<profile-name>/skills/<category>/<skill-name>/SKILL.md

Observed behavior

A profile-local skill exists and is valid on disk, but cannot be loaded from the Desktop/TUI slash-command path.

Symptoms may include:

  • Desktop/TUI slash command palette does not show the profile-local skill
  • invoking the skill by name fails
  • slash command child workers appear to run with the root/default HERMES_HOME
  • skill discovery reads from the wrong skills directory
  • the selected profile in the UI does not match the effective execution profile of the backend/worker process

Example process shape observed:

hermes dashboard --host 0.0.0.0 --port <port> --no-open --insecure
node .../ui-tui/dist/entry.js
python -m tui_gateway.slash_worker ...

The relevant worker processes appear to inherit:

HERMES_HOME=/path/to/root/home

instead of the selected profile home:

HERMES_HOME=/path/to/root/home/profiles/<profile-name>

Expected behavior

When Desktop/TUI is operating under a selected profile, all profile-sensitive operations should resolve against that profile's Hermes home, including:

  • skill discovery
  • slash command catalog generation
  • slash command autocomplete
  • command.dispatch
  • slash worker child processes
  • /reload-skills
  • any skill-related JSON-RPC endpoints

A profile-local skill located under:

$ROOT_HERMES_HOME/profiles/<profile-name>/skills/...

should be discoverable and loadable when that profile is selected.

Actual behavior

The Desktop/TUI UI can appear to be using a selected profile, but the backend/worker process uses the root/default Hermes home for skill discovery.

Therefore profile-local skills are missing from the slash-command catalog and cannot be loaded through the Desktop/TUI flow.

Why this matters

This breaks multi-profile Hermes setups where skills are intentionally scoped to a profile.

In a remote Desktop/Dashboard setup, users expect the selected profile to determine the effective runtime context. If long-running backend processes or child workers remain pinned to the root/default HERMES_HOME, the UI gives a misleading impression that a profile is active while execution still happens in a different home.

This is especially problematic for:

  • Docker deployments
  • remote Desktop clients
  • profile-local skills
  • multi-profile workflows
  • custom HERMES_HOME layouts
  • setups where different profiles have different tools, skills, memories, or config

Suspected root cause

This looks like a profile propagation / process-context issue rather than a missing skill or invalid skill file.

Likely problem area:

  • Dashboard/TUI process starts with root/default HERMES_HOME
  • Desktop selects or displays a named profile
  • slash command catalog or skill command cache is built from process-global home
  • tui_gateway.slash_worker child processes inherit the parent process environment
  • profile-specific HERMES_HOME is not passed into the worker or resolved per request/session
  • skill discovery therefore scans the wrong directory

Cache warming alone does not fix this if the cache is warmed from the wrong Hermes home.

Suggested fix direction

Skill discovery and slash-command dispatch should be profile-aware.

Possible fixes:

  1. Resolve the effective profile home per request/session before building the skill command catalog.
  2. Pass the selected profile context explicitly to command.dispatch and slash workers.
  3. Ensure tui_gateway.slash_worker receives the selected profile's effective HERMES_HOME / HERMES_PROFILE.
  4. Avoid relying on process-global boot-time HERMES_HOME for profile-sensitive Desktop/TUI operations.
  5. Include the effective hermes_home and profile name in relevant debug/status responses to make mismatches visible.
  6. Make /reload-skills reload from the selected profile home, not from the dashboard process root home.

Related upstream issues / PRs

This appears related to several existing profile/discovery issues, but I could not find an exact duplicate for this specific Desktop/TUI slash-worker profile-local skills case.

Related:

Distinction from #38651 / #39036

This is not only a slash command cache warming issue.

If the TUI/Desktop skill command cache is warmed while the process has the wrong HERMES_HOME, the cache will be correctly populated from the wrong skill root. The profile-local skill will still be missing.

So the core issue is not just:

slash command cache is empty

It is:

slash command discovery and dispatch are not using the selected profile's effective Hermes home

Minimal reproduction outline

# Use a root Hermes home with profiles
export HERMES_HOME=/path/to/root/home

# Create or use a named profile
hermes profile create test-profile
hermes profile use test-profile

# Add a skill only to the profile-local skills directory
mkdir -p "$HERMES_HOME/profiles/test-profile/skills/productivity/example-skill"

cat > "$HERMES_HOME/profiles/test-profile/skills/productivity/example-skill/SKILL.md" <<'EOF'
---
name: example-skill
description: Example profile-local skill
---

# Example Skill

This skill exists only in the test profile.
EOF

# Start Dashboard/TUI backend in Docker or remote/dashboard mode
hermes dashboard --host 0.0.0.0 --port <port> --no-open --insecure

# Connect Hermes Desktop to the remote backend.
# Select or verify test-profile in the UI.
# Open slash command palette or try invoking /example-skill.

Expected:

/example-skill is discoverable and loadable

Actual:

/example-skill is missing or cannot be loaded

Inspecting the dashboard/TUI/slash worker process environment shows it is using the root/default Hermes home instead of:

/path/to/root/home/profiles/test-profile

Acceptance criteria

  • A profile-local skill appears in Desktop/TUI slash command discovery when its profile is selected.
  • Slash command autocomplete, catalog generation, dispatch, and workers all use the same effective profile context.
  • /reload-skills reloads from the selected profile home.
  • Debug/status output makes the effective profile and HERMES_HOME visible.
  • Regression test covers a custom root HERMES_HOME with a profile-local skill under profiles/<name>/skills.

Steps to Reproduce

Steps to reproduce

1. Start container

2. Create/use profile

3. Add a skill only to the profile-local skill directory

4. Start Dashboard/TUI backend

5. Connect Hermes Desktop

6. Check slash-command discovery

Expected Behavior

The skill is discoverable and loadable from Desktop/TUI:

/example-profile-skill

Actual Behavior

The skill is missing from Desktop/TUI slash-command discovery or cannot be loaded.

Desktop/TUI appears to use the root/default home for skill discovery:

/opt/data

instead of the selected profile context:

/opt/data/profiles/test-profile

Affected Component

Other

Messaging Platform (if gateway-related)

N/A (CLI only)

Debug Report

Debug report uploaded:
  Report       https://paste.rs/LnIaK
  agent.log    https://paste.rs/YusJ5
  gateway.log  https://paste.rs/DUghm

Operating System

Debian GNU/Linux 13 (trixie)

Python Version

3.13.5

Hermes Version

0.16.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Activity

  1. added
    type/bugSomething isn't working
    P2Medium — degraded but workaround exists
    tool/skillsSkills system (list, view, manage)
    comp/tuiTerminal UI (ui-tui/ + tui_gateway/)
    on Jun 6, 2026
  2. teknium1 commented on Jul 7, 2026

    @teknium1
    Collaborator

    Fixed by PR #60180 (#60180), which combines two community fixes with authorship preserved:

    Thanks for the thorough report — the process-shape observation (workers inheriting the root HERMES_HOME) matched the root cause exactly.

  3. tarkilhk commented on Sep 7, 2026

    @tarkilhk

    I reproduced a remaining in-process RPC case on 2026-09-07 while testing an Android client against a local hermes serve backend. This looks like the follow-up already tracked by open PR #81640, so I am adding evidence here rather than opening a duplicate.

    Environment: Windows 11 build 26200, Python 3.11.15, Hermes 0.21.0, installed checkout b499ab11fe8b081470e269f2fb27abae03000da5. This concerns profile-local skills under profiles/<name>/skills, not project-local skills from a session's working directory.

    Reproduction and observed result

    1. Use a root Hermes home with two disposable profiles, android-qa-a and android-qa-b, whose skills directories are independent.
    2. Add skills/android-mobile-slash-qa/SKILL.md to each profile. Use the same frontmatter name, short descriptions containing the respective profile name, and distinct bodies containing ANDROID_SLASH_android-qa-a / ANDROID_SLASH_android-qa-b. Do not put the fixture in the root skills directory.
    3. Start one local backend. For this run: hermes --profile android-qa-a serve --host 127.0.0.1 --port 49193, with the root HERMES_HOME.
    4. Create a session for profile A and call commands.catalog with both profile: "android-qa-a" and that session's session_id.
    5. The response omits /android-mobile-slash-qa, although direct scan_skill_commands() under the intended home override finds and parses the fixture.

    This is a missing catalog entry, not an exception or traceback. I directly reproduced the catalog failure before the workaround; I did not separately establish a pre-patch failure for every command handler.

    Local workaround and validation

    I applied the existing profile-scoping helpers at the RPC entry points and restarted the backend:

    • commands.catalog: @_rpc to @_scoped_rpc.
    • complete.slash: add @_profile_scoped.
    • Also scope command.dispatch and slash.exec with @_scoped_rpc for client requests explicitly carrying the originating profile.

    Afterward, a real A/B contract test passed against the same backend. For each profile, it creates a session and checks that the catalog description, completion metadata, and dispatched skill expansion contain that profile's marker. It never submits the expanded prompt or invokes a model. An Android emulator also passed command discovery, /model, /status, and skill-expansion checks.

    References: workaround patch, A/B RPC test. This is a local workaround, not a replacement for #81640's treatment of authoritative session binding and caches. These tests do not establish concurrent-request isolation, handling of conflicting profile/session hints, or project-cwd correctness.

    Upstream status checked

    At upstream main commit fc8d15d7797c36cdc78ca9cd4a07187c3cc61c91, commands.catalog still uses the unscoped registration, and complete.slash still lacks the profile-scoping decorator. That is a source check; the live run used the installed commit above.

    #81640 directly covers this remaining catalog/completion path. #90231 concerns the separate project-cwd axis. The earlier worker fix in #60180 therefore does not appear to finish the in-process discovery portion of this report.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/tuiTerminal UI (ui-tui/ + tui_gateway/)tool/skillsSkills system (list, view, manage)type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions