Skip to content

Windows: plugin runtime data and paths assume POSIX ~/.hermes instead of HERMES_HOME (%LOCALAPPDATA%\hermes) #2221

Description

@asorry75

Bug Description

On Windows, the memos-local-plugin resolves the Hermes home as ~/.hermes in several places, while Hermes itself uses %LOCALAPPDATA%\hermes (HERMES_HOME). The result is that the plugin's runtime data lives outside the Hermes home, and several features either break or silently miss data.

Hermes' own platform resolution (hermes_constants.py):

def _get_platform_default_hermes_home() -> Path:
    if sys.platform == "win32":
        local_appdata = os.environ.get("LOCALAPPDATA", "").strip()
        base = Path(local_appdata) if local_appdata else Path.home() / "AppData" / "Local"
        return base / "hermes"
    return Path.home() / ".hermes"

The plugin hardcodes the POSIX convention instead:

  • adapters/hermes/memos_provider/__init__.py:132Path.home() / ".hermes" / "memos-plugin"
  • adapters/hermes/memos_provider/bridge_client.py:69agent_home = ".hermes"
  • bridge.cts:96 / bridge.mts:82agentHome = ".hermes"
  • core/config/paths.ts:32hermes: "{HOME}/.hermes/memos-plugin"
  • server/routes/migrate.ts:70join(homedir(), ".hermes", "memos-state", ...)

Observed impact on Windows

  1. Install writes config to the wrong place — the template config.yaml lands under the code dir instead of the runtime home the daemon reads → fix: install.ps1 writes Hermes config template to the wrong location #2211 (fixed by PR).
  2. Native memory import can't find Hermes' MEMORY.md — hardcoded ~/.hermes, but Hermes stores it under %LOCALAPPDATA%\hermes\memories\fix: resolve Hermes native memory import path on Windows #2210 (fixed by PR).
  3. hermes backup may not include plugin data — Hermes' backup walks HERMES_HOME; state kept at ~/.hermes/memos-plugin is outside it, so it is only captured if the provider declares backup_paths() (see agent/memory_provider.py). On Windows this is the default layout, so a fresh install's data is at risk of being omitted from backups.
  4. Data is split from the Hermes home — tools, scripts and users that follow HERMES_HOME won't find the plugin's data; the plugin creates its own ~/.hermes directory that is unrelated to the real Hermes home on Windows.

Question

Is this intentional (a cross-platform convention where the plugin keeps its data at Path.home()/.hermes regardless of the host's real home), or an oversight from POSIX-first development? If intentional, it would help to document it; if not, resolving the Hermes home through HERMES_HOME (with a platform fallback, like the fix in #2210) would make the plugin consistent with Hermes on every platform.

Environment

  • OS: Windows (native, not WSL)
  • Plugin: memos-local-plugin 2.0.12 (Hermes adapter)

Related

Metadata

Metadata

Labels

ai:pr-readyAI-created PR is ready for review | AI 生成的 PR 已等待评审area:pluginOpenClaw & Hermesstatus:in-progressSomeone or AI is working on it | 人工或 AI 正在处理types:bugSomething isn't working | 功能异常

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions