hermes - 💡(How to fix) Fix kanban: shutil.which('hermes') returns None in gateway dispatcher despite binary on PATH

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…

_default_spawn() in hermes_cli/kanban_db.py uses shutil.which("hermes") to locate the hermes binary before spawning kanban workers. In certain environments, shutil.which() returns None even though hermes is installed at /usr/local/bin/hermes and /usr/local/bin is correctly set in PATH.

Error Message

RuntimeError: hermes executable not found on PATH. Install Hermes Agent or activate its venv before running the kanban dispatcher.

Root Cause

_default_spawn() in hermes_cli/kanban_db.py uses shutil.which("hermes") to locate the hermes binary before spawning kanban workers. In certain environments, shutil.which() returns None even though hermes is installed at /usr/local/bin/hermes and /usr/local/bin is correctly set in PATH.

Fix Action

Fix / Workaround

Affected downstream project: Naroh091/hermes-war-room — the UI orchestration layer built on Hermes Agent kanban delegation. Worker dispatch failures render the War Room unusable since review tasks can never be picked up.

RuntimeError: `hermes` executable not found on PATH. Install Hermes Agent
or activate its venv before running the kanban dispatcher.

The gateway log repeats:

kanban dispatcher stuck: ready queue non-empty for N consecutive ticks
but 0 workers spawned.

Code Example

RuntimeError: `hermes` executable not found on PATH. Install Hermes Agent
or activate its venv before running the kanban dispatcher.

---

kanban dispatcher stuck: ready queue non-empty for N consecutive ticks
but 0 workers spawned.

---

hermes_bin = shutil.which("hermes")
if not hermes_bin:
    raise RuntimeError(...)

---

hermes_bin = shutil.which("hermes") or "/usr/local/bin/hermes"
if not os.path.isfile(hermes_bin):
    raise RuntimeError(...)
if not os.access(hermes_bin, os.X_OK):
    raise RuntimeError(...)
RAW_BUFFERClick to expand / collapse

Affected downstream project: Naroh091/hermes-war-room — the UI orchestration layer built on Hermes Agent kanban delegation. Worker dispatch failures render the War Room unusable since review tasks can never be picked up.

Summary

_default_spawn() in hermes_cli/kanban_db.py uses shutil.which("hermes") to locate the hermes binary before spawning kanban workers. In certain environments, shutil.which() returns None even though hermes is installed at /usr/local/bin/hermes and /usr/local/bin is correctly set in PATH.

Symptom

RuntimeError: `hermes` executable not found on PATH. Install Hermes Agent
or activate its venv before running the kanban dispatcher.

The gateway log repeats:

kanban dispatcher stuck: ready queue non-empty for N consecutive ticks
but 0 workers spawned.

All kanban tasks accumulate spawn_failures and eventually auto-block.

Environment

  • Hermes installed at /usr/local/bin/hermes (symlink to /root/.local/bin/hermes)
  • /usr/local/bin present in PATH (verified via /proc/<pid>/environ)
  • shutil.which("hermes") works correctly when called interactively from the same Python interpreter, but fails inside the gateway dispatcher loop

Current code

File: hermes_cli/kanban_db.py line 2079

hermes_bin = shutil.which("hermes")
if not hermes_bin:
    raise RuntimeError(...)

Suggested fix

Add a hardcoded fallback path so the dispatcher doesn't deadlock when shutil.which() fails silently:

hermes_bin = shutil.which("hermes") or "/usr/local/bin/hermes"
if not os.path.isfile(hermes_bin):
    raise RuntimeError(...)
if not os.access(hermes_bin, os.X_OK):
    raise RuntimeError(...)

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 kanban: shutil.which('hermes') returns None in gateway dispatcher despite binary on PATH