hermes - 💡(How to fix) Fix hermes dashboard --status reports stale PIDs on macOS [1 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…

Root Cause

_find_stale_dashboard_pids() in hermes_cli/main.py uses pgrep -f on macOS, but macOS pgrep does not support -f (full command line match). This causes incomplete matching and stale PID entries.

Linux path uses /proc/<pid>/cmdline which works fine.

Fix Action

Fixed

Code Example

$ hermes dashboard --status
3 hermes dashboard process(es) running:
    PID 56731
    PID 56740
    PID 61666

$ ps -p 61666
PID TTY           TIME CMD
# (empty — process gone)

---

result = subprocess.run(["ps", "-A", "-o", "pid=,command="], ...)
for line in result.stdout.splitlines():
    pid, cmd = line.strip().split(None, 1)
    if "hermes dashboard" in cmd:
        pids.append(int(pid))
RAW_BUFFERClick to expand / collapse

Problem

On macOS, hermes dashboard --status reports phantom PIDs that no longer exist.

$ hermes dashboard --status
3 hermes dashboard process(es) running:
    PID 56731
    PID 56740
    PID 61666

$ ps -p 61666
PID TTY           TIME CMD
# (empty — process gone)

Root Cause

_find_stale_dashboard_pids() in hermes_cli/main.py uses pgrep -f on macOS, but macOS pgrep does not support -f (full command line match). This causes incomplete matching and stale PID entries.

Linux path uses /proc/<pid>/cmdline which works fine.

Suggested Fix

Replace pgrep -f with ps -A -o pid=,command= + Python filtering on macOS.

result = subprocess.run(["ps", "-A", "-o", "pid=,command="], ...)
for line in result.stdout.splitlines():
    pid, cmd = line.strip().split(None, 1)
    if "hermes dashboard" in cmd:
        pids.append(int(pid))

Environment

  • macOS 15.x
  • Hermes main @ e85592591
  • Python 3.12

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 hermes dashboard --status reports stale PIDs on macOS [1 pull requests]