hermes - ✅(Solved) Fix hermes update doesn't warn about stale dashboard processes (frontend/backend version mismatch) [3 pull requests, 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#16872Fetched 2026-04-29 06:38:22
View on GitHub
Comments
0
Participants
1
Timeline
10
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×3referenced ×2closed ×1

Error Message

In v0.11.0 the frontend changed to send the session token via the X-Hermes-Session-Token header. A dashboard process started before v0.11.0 only checks Authorization: Bearer. Every API call returns 401. The page loads but all data endpoints fail with no visible error (sessions, config, keys all return "Unauthorized").

Root Cause

This is hard to diagnose because:

  • The HTML page loads fine (static file, always fresh from disk)
  • The session token lands in the page
  • No visible error in the UI, just empty data
  • You assume the dashboard is broken, not that it needs a restart

Fix Action

Fixed

PR fix notes

PR #16881: fix(cli): warn about stale dashboard processes after hermes update

Description (problem / solution / changelog)

Fixes #16872

What

After a successful update, scan the process table for running hermes dashboard processes and print a warning with their PIDs and restart instructions. Mirrors the existing pattern for gateway processes (lines 6809-7135 in main.py).

The dashboard is a long-lived server process users start and forget. Unlike the gateway (auto-restart via systemd/launchd), the dashboard has no service manager. It runs as a bare nohup or background process. When hermes update replaces files on disk, the running process holds the old Python code in memory while the JS bundle on disk gets updated, producing a silent frontend/backend mismatch.

Changes

  • hermes_cli/main.py: Add _warn_stale_dashboard_processes() that scans for dashboard processes via pgrep (Linux/macOS) or wmic (Windows), called at the end of both _cmd_update_impl (git path) and _update_via_zip (zip path).
  • tests/hermes_cli/test_update_stale_dashboard.py: Tests for the warning: fires when dashboard PIDs exist, silent when none found, self-PID excluded, errors handled without crashing.

How to test

  1. Start hermes dashboard --port 9119 --no-open in a terminal
  2. In another terminal, run hermes update (or the test suite)
  3. Observe the warning message with the PID
  4. Verify no warning when no dashboard is running

Changed files

  • hermes_cli/main.py (modified, +79/-0)
  • tests/hermes_cli/test_update_stale_dashboard.py (added, +106/-0)

PR #16895: fix(cli): warn about stale dashboard processes after hermes update

Description (problem / solution / changelog)

Salvages #16881 (@Societus) with a follow-up tightening commit.

What this PR does

After hermes update finishes (both git and zip paths), scans the process table for running hermes dashboard processes and prints a warning with PIDs + restart instructions.

Why

v0.11.0 added X-Hermes-Session-Token. A dashboard process started before the update keeps the old Python backend in memory while the JS bundle on disk gets replaced — the new frontend sends headers the stale backend doesn't recognize, so every API call returns 401 with no visible error (HTML loads, all data empty). Fixes #16872.

The dashboard has no service manager (unlike the gateway, which systemd/launchd auto-restart), so we can only warn — not auto-kill.

Changes

  • hermes_cli/main.py: new _warn_stale_dashboard_processes() called from _cmd_update_impl (git path) and _update_via_zip (zip path). Cross-platform: ps on Linux/macOS, wmic on Windows. Excludes self-PID. Swallows FileNotFoundError/TimeoutExpired/OSError.
  • tests/hermes_cli/test_update_stale_dashboard.py: 10 unit tests — warning fires/doesn't, multi-PID, self excluded, missing binary, timeout, malformed lines, grep-line filter, and a regression guard for the previously greedy pattern.

Follow-up tightening (commit 63b71c52)

The original Linux branch used pgrep -f "hermes.*dashboard" — a greedy regex that matches any cmdline containing both words (e.g. a chat session discussing "dashboard" or an unrelated grafana/dashboard-server). Replaced with ps -A -o pid=,command= + the explicit patterns list already used on the Windows branch and in hermes_cli.gateway._scan_gateway_pids:

  • hermes dashboard
  • hermes_cli.main dashboard
  • hermes_cli/main.py dashboard

Validation

  • 10/10 unit tests pass
  • E2E: spawned fake python3 -m hermes_cli.main dashboard --port 9119 via exec -a, confirmed detection. Also detected a real pre-existing dashboard on the same machine.

Closes #16881. Fixes #16872.

Changed files

  • hermes_cli/main.py (modified, +92/-0)
  • tests/hermes_cli/test_update_stale_dashboard.py (added, +177/-0)

PR #17149: test(update-autostash): include stdout in fake_run defaults so stale-dashboard scan doesn't crash

Description (problem / solution / changelog)

Summary

  • Lifts a CI baseline introduced by 66b114238 — two cmd_update integration tests in test_update_autostash.py have been crashing on origin/main since the _warn_stale_dashboard_processes() call landed in _cmd_update_impl.

The bug

Commit 66b114238 ("fix(cli): warn about stale dashboard processes after hermes update") added a new

subprocess.run([\"ps\", \"-A\", \"-o\", \"pid=,command=\"], capture_output=True, text=True, timeout=10)

call inside _cmd_update_impl and reads result.stdout.split(\"\\n\"). The two cmd_update integration tests in tests/hermes_cli/test_update_autostash.py mock subprocess.run with a catch-all SimpleNamespace(returncode=0) that omits stdout. After 66b114238, both tests crash inside _warn_stale_dashboard_processes with:

hermes_cli/main.py:5309: AttributeError
'types.SimpleNamespace' object has no attribute 'stdout'

Affected tests:

  • tests/hermes_cli/test_update_autostash.py::test_cmd_update_succeeds_with_extras
  • tests/hermes_cli/test_update_autostash.py::test_cmd_update_retries_optional_extras_individually_when_all_fails

Reproduces deterministically on a clean clone of origin/main (verified at a830f25f7).

The fix

Add stdout=\"\", stderr=\"\" to the catch-all SimpleNamespace(returncode=0) returns in both tests' fake_run so the new ps-scan finds zero dashboard processes and short-circuits cleanly. The two explicit pip-install branches that returned bare SimpleNamespace(returncode=0) are extended the same way for symmetry — no production behavior changes, only test fixture hygiene.

This is intentionally test-only. The production path is already covered by the _warn_stale_dashboard_processes regression tests added in #17123 (and the wmic-encoding fix in #17074).

Test plan

  • uv run --with pytest --with pytest-xdist python3 -m pytest tests/hermes_cli/test_update_autostash.py -v — 23 passed, was 21 passed + 2 failed on origin/main.
  • uv run --with pytest --with pytest-xdist python3 -m pytest tests/hermes_cli/test_update_stale_dashboard.py -v — 10 passed (no regression).
  • Regression guard: removed the stdout=\"\" additions on a clean origin/main clone, reproduced the original AttributeError: 'types.SimpleNamespace' object has no attribute 'stdout' failure with identical traceback at hermes_cli/main.py:5309. Restored the fix, both tests pass.

Related

  • Source of the regression: 66b114238 ("fix(cli): warn about stale dashboard processes after hermes update"), fixes #16872.
  • Production path is exercised by the regression suite added in #17123 and #17074.

Changed files

  • tests/hermes_cli/test_update_autostash.py (modified, +4/-4)
RAW_BUFFERClick to expand / collapse

Bug

After hermes update, a hermes dashboard process started before the update keeps running with the old Python backend in memory while the JS bundle on disk gets replaced. The updated frontend sends requests the stale backend can't handle.

Reproduction

  1. hermes dashboard --port 9119 --host 127.0.0.1 --no-open (leave running)
  2. hermes update
  3. Open the dashboard in a browser

Observed behavior

In v0.11.0 the frontend changed to send the session token via the X-Hermes-Session-Token header. A dashboard process started before v0.11.0 only checks Authorization: Bearer. Every API call returns 401. The page loads but all data endpoints fail with no visible error (sessions, config, keys all return "Unauthorized").

This is hard to diagnose because:

  • The HTML page loads fine (static file, always fresh from disk)
  • The session token lands in the page
  • No visible error in the UI, just empty data
  • You assume the dashboard is broken, not that it needs a restart

Expected behavior

hermes update should detect running dashboard processes and tell the user to restart them, similar to how it handles gateway processes (auto-restarts services, stops manual processes).

Suggested fix

After the git pull + pip install + web UI build steps, scan for running dashboard processes and print a warning. PR to follow.

extent analysis

TL;DR

Restart the hermes dashboard process after running hermes update to ensure compatibility with the updated frontend.

Guidance

  • Verify that the hermes dashboard process is using the old Python backend by checking the process's startup time or version.
  • After running hermes update, manually restart the hermes dashboard process to ensure it uses the updated backend.
  • To mitigate the issue, consider adding a warning or notification to the hermes update command to remind users to restart the dashboard process.
  • Check the API request headers to confirm that the X-Hermes-Session-Token header is being sent correctly.

Example

No code snippet is provided as it is not necessary for this issue.

Notes

This solution assumes that the issue is caused by the hermes dashboard process not being restarted after the update. If the issue persists after restarting the process, further investigation may be needed.

Recommendation

Apply workaround: Restart the hermes dashboard process after running hermes update, as this is a simple and effective way to resolve the issue until a more permanent fix is implemented.

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…

FAQ

Expected behavior

hermes update should detect running dashboard processes and tell the user to restart them, similar to how it handles gateway processes (auto-restarts services, stops manual processes).

Still need to ship something?

×6

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

Back to top recommendations

TRENDING