hermes - 💡(How to fix) Fix [Bug]: Gateway extract_media and extract_local_files fail to parse Windows file paths [2 pull requests]

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

Additional Logs / Traceback (optional)

Root Cause

This occurs in hermes-agent/gateway/platforms/base.py because the regular expressions strictly anchor to POSIX roots (?:~/|/) and forward slashes, completely ignoring Windows drive letters (C:) and backslashes.

Fix Action

Fixed

Code Example

(venv) PS C:\Users\mukul\AppData\Local\hermes> hermes debug share
⚠️  This will upload the following to a public paste service:
System info (OS, Python version, Hermes version, provider, which API keys
    are configured — NOT the actual keys)
Recent log lines (agent.log, errors.log, gateway.log — may contain
    conversation fragments and file paths)
Full agent.log and gateway.log (up to 512 KB each — likely contains
    conversation content, tool outputs, and file paths)

Pastes auto-delete after 6 hours.

Collecting debug report...
Uploading...

Debug report uploaded:
  Report       https://paste.rs/1tu4O
  agent.log    https://paste.rs/l8k56
  gateway.log  https://paste.rs/HOqQh

Pastes will auto-delete in 6 hours.
To delete now:  hermes debug delete <url>

---
RAW_BUFFERClick to expand / collapse

Bug Description

When running Hermes on Windows, if an agent attempts to send a local file or screenshot, the gateway fails to extract the path and upload the attachment.

This occurs in hermes-agent/gateway/platforms/base.py because the regular expressions strictly anchor to POSIX roots (?:~/|/) and forward slashes, completely ignoring Windows drive letters (C:) and backslashes.

Steps to Reproduce

f an agent attempts to send a local file or screenshot, the gateway fails to extract the path and upload the attachment.

Expected Behavior

ff an agent attempts to send a local file or screenshot, the gateway get the right path and upload the attachment.

Actual Behavior

Update the anchor in the regexes for media_pattern and path_re to support Windows drive letters and backslashes, for example changing: (?:/|/) to (?:/|/|[a-zA-Z]:[\/])

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

Discord, Telegram

Debug Report

(venv) PS C:\Users\mukul\AppData\Local\hermes> hermes debug share
⚠️  This will upload the following to a public paste service:
  • System info (OS, Python version, Hermes version, provider, which API keys
    are configured — NOT the actual keys)
  • Recent log lines (agent.log, errors.log, gateway.log — may contain
    conversation fragments and file paths)
  • Full agent.log and gateway.log (up to 512 KB each — likely contains
    conversation content, tool outputs, and file paths)

Pastes auto-delete after 6 hours.

Collecting debug report...
Uploading...

Debug report uploaded:
  Report       https://paste.rs/1tu4O
  agent.log    https://paste.rs/l8k56
  gateway.log  https://paste.rs/HOqQh

⏱  Pastes will auto-delete in 6 hours.
To delete now:  hermes debug delete <url>

Operating System

Windows

Python Version

3.11

Hermes Version

v0.15.1

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

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

hermes - 💡(How to fix) Fix [Bug]: Gateway extract_media and extract_local_files fail to parse Windows file paths [2 pull requests]