hermes - 💡(How to fix) Fix [Windows] MSYS2 path mangling creates phantom C:\c directory — breaks logging, cron, and sessions

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

First observed 2026-06-04 21:13 CST. Cron job with explicit model field triggered empty-model-string API error — may be path-confusion related.

Root Cause

  1. Path.resolve() returns C:\c\Users... even with correct input
  2. RotatingFileHandler.__init__os.path.abspath() → mangled baseFilename
  3. open() / os.makedirs() intercepted at Win32 API level — msys-2.0.dll NOT loaded in Python

Fix Action

Fix / Workaround

Workarounds Tested

RAW_BUFFERClick to expand / collapse

Bug Description

On Windows hosts where Python runs under an MSYS2 / git-bash environment, file-system paths get silently mangled: C:\Users\... becomes C:\c\Users\.... This creates two parallel directory trees.

Impact

  • Gateway logs, cron state (jobs.json / .tick.lock), sessions split across two locations
  • Cron scheduler loads empty jobs.json from phantom path → all jobs stuck
  • Gateway running but scheduler never ticks
  • Complete C:\c hermes duplicate (~hundreds MB)

Root Cause

  1. Path.resolve() returns C:\c\Users... even with correct input
  2. RotatingFileHandler.__init__os.path.abspath() → mangled baseFilename
  3. open() / os.makedirs() intercepted at Win32 API level — msys-2.0.dll NOT loaded in Python

Environment

  • Windows 10, git-bash (MINGW64)
  • CPython 3.11 native (via uv), NOT MSYS2 Python
  • Hermes v0.15.1 editable install

Workarounds Tested

  • Source fixes to hermes_logging.py, hermes_constants.py, cron/scheduler.py unmangle paths — work directly, NOT via Scheduled Task
  • MSYS_NO_PATHCONV=1 — no effect

Steps to Reproduce

  1. Install Hermes on Windows with git-bash
  2. Set up cron jobs + Scheduled Task gateway
  3. C:\c phantom directory appears
  4. Cron ticker starts but never fires

Related

First observed 2026-06-04 21:13 CST. Cron job with explicit model field triggered empty-model-string API error — may be path-confusion related.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING