hermes - 💡(How to fix) Fix [Bug]: WSL: gateway install/start fails even when systemd is running [1 participants]

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…
GitHub stats
NousResearch/hermes-agent#18032Fetched 2026-05-01 05:54:14
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4renamed ×1

Root Cause

The issue is in hermes_cli/gateway.py. The is_wsl() branch in the install/start code path doesn't call _wsl_systemd_operational() to verify systemd is actually working — it just assumes WSL means no systemd and exits. However, supports_systemd_services() (line 717) DOES correctly check _wsl_systemd_operational(), so the systemd path at line 4079 is never reached because is_wsl() short-circuits at line 4088.

RAW_BUFFERClick to expand / collapse

When running hermes gateway install or hermes gateway start on WSL2 with systemd properly enabled (systemd=true in /etc/wsl.conf, PID 1 is systemd, systemctl is-system-running returns "running"), Hermes still reports:

"WSL detected but systemd is not available" / "Service installation not supported on this platform"

The issue is in hermes_cli/gateway.py. The is_wsl() branch in the install/start code path doesn't call _wsl_systemd_operational() to verify systemd is actually working — it just assumes WSL means no systemd and exits. However, supports_systemd_services() (line 717) DOES correctly check _wsl_systemd_operational(), so the systemd path at line 4079 is never reached because is_wsl() short-circuits at line 4088.

The logic should check supports_systemd_services() first (which it does), but the elif is_wsl() branch at line 4088 catches cases where supports_systemd_services() returns False. When supports_systemd_services() returns True AND is_wsl() is True, it correctly enters line 4080 — but this path requires systemd to actually be operational.

In my case, systemd IS operational but supports_systemd_services() still returns False on WSL. Please verify the _wsl_systemd_operational() detection logic.

Reproduce:
1. WSL2 with systemd=true in /etc/wsl.conf
2. Run wsl --shutdown from PowerShell, reopen WSL
3. Confirm: ps -p 1 -o comm= shows "systemd"
4. Run: hermes gateway install → fails

extent analysis

TL;DR

The issue can be resolved by modifying the hermes_cli/gateway.py to correctly check for systemd availability on WSL2 by calling _wsl_systemd_operational() in the is_wsl() branch.

Guidance

  • Verify that _wsl_systemd_operational() correctly detects systemd availability on WSL2 by checking its implementation and ensuring it returns True when systemd is operational.
  • Modify the is_wsl() branch in hermes_cli/gateway.py to call _wsl_systemd_operational() and only exit if it returns False.
  • Check the logic in supports_systemd_services() to ensure it correctly returns True when systemd is available, even on WSL2.
  • Test the changes by reproducing the issue using the provided steps and verifying that hermes gateway install succeeds.

Example

No code snippet is provided as the issue requires a specific change to the hermes_cli/gateway.py file, which is not explicitly stated.

Notes

The issue is specific to WSL2 with systemd enabled, and the fix may not apply to other platforms or configurations.

Recommendation

Apply workaround: Modify the hermes_cli/gateway.py file to correctly check for systemd availability on WSL2, as the current implementation has a logical error that prevents it from working correctly.

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]: WSL: gateway install/start fails even when systemd is running [1 participants]