Skip to content

Hermes Agent config ignores HERMES_HOME — written to ~/.hermes instead of the active config dir #3628

Description

@abdulkadirozyurt

OmniRoute Version

3.8.21

Installation Method

npm (global)

Operating System

Windows

OS Version

Windows 11 (native, PowerShell install)

Node.js Version

No response

Provider(s) Involved

No response

Model(s) Involved

Hermes Agent (nous-research/hermes-agent)

Client Tool

Hermes Agent

Description

OmniRoute always writes the Hermes Agent config to ~/.hermes/config.yaml (path.join(os.homedir(), ".hermes", "config.yaml")). But Hermes lets the install location be overridden via the HERMES_HOME environment variable, and the official native-Windows PowerShell installer sets it to %LOCALAPPDATA%\hermes.

So on a native-Windows install, Hermes reads its config from %LOCALAPPDATA%\hermes\config.yaml while OmniRoute writes to ~/.hermes/config.yaml. The two never meet: setup reports success, but Hermes starts with providers: {} — as if OmniRoute was never configured.

The docs showing ~/.hermes/ are correct for the default case; they just don't account for HERMES_HOME, which the Windows installer sets.

Suggested fix — resolve the config dir from the env var, falling back to the current default:

const hermesHome = process.env.HERMES_HOME || path.join(os.homedir(), ".hermes");
const CONFIG_PATH = path.join(hermesHome, "config.yaml");

Same change applies to every place that hardcodes the path:

  • src/shared/services/cliRuntime.ts ("hermes-agent"paths.config)
  • src/lib/cli-helper/config-generator/hermes-agent.ts (CONFIG_PATH)
  • src/app/api/cli-tools/hermes-agent-settings/route.ts (CONFIG_PATH)
  • src/lib/cli-helper/config-generator/index.ts (TOOL_CONFIG_PATHS["hermes-agent"])

Steps to Reproduce

  1. Install Hermes on native Windows: iex (irm https://hermes-agent.nousresearch.com/install.ps1) (sets HERMES_HOME=%LOCALAPPDATA%\hermes)
  2. Open OmniRoute → CLI Code / Agents → Hermes Agent → run the setup wizard
  3. Check %LOCALAPPDATA%\hermes\config.yaml → still providers: {}
  4. Check ~/.hermes/config.yaml → OmniRoute provider was written here instead

Expected Behavior

OmniRoute honors HERMES_HOME and writes to the directory Hermes actually reads — %LOCALAPPDATA%\hermes\config.yaml when that env var is set.

Actual Behavior

Config is always written to ~/.hermes/config.yaml. With HERMES_HOME set (default on native-Windows installs), Hermes never sees it and stays unconfigured.

Test Impact

Needs a new unit test

Error Logs / Output

Screenshots

No response

Additional Context

No response

Validation Plan

  • With HERMES_HOME set, getCliPrimaryConfigPath("hermes-agent") resolves under $HERMES_HOME
  • Without it, it still falls back to ~/.hermes/config.yaml (no regression)
  • Add a unit test covering both cases in tests/unit/cli-helper/config-generator.test.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions