fix(cli): warn about stale dashboard processes after hermes update#16881
Closed
Societus wants to merge 1 commit into
Closed
fix(cli): warn about stale dashboard processes after hermes update#16881Societus wants to merge 1 commit into
Societus wants to merge 1 commit into
Conversation
The dashboard is a long-lived server process users start and forget. When hermes update replaces files on disk, the running process holds the old Python backend in memory while the JS bundle gets updated, producing a silent frontend/backend mismatch (e.g. v0.11.0 changed the session token header -- old backends reject every API call). Scan for running dashboard processes after a successful update (both git and ZIP paths) and print a warning with their PIDs and restart instructions. Mirrors the existing pattern for gateway processes. Fixes NousResearch#16872
teknium1
added a commit
that referenced
this pull request
Apr 28, 2026
Replace the Linux/macOS pgrep regex ("hermes.*dashboard") with a ps
scan + the same 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
The old greedy regex would match any cmdline containing both words —
e.g. a chat session whose argv mentions "dashboard" or an unrelated
grafana/dashboard-server process. Added regression tests for both.
Follow-up tightening on #16881.
Contributor
|
Merged via #16895. Your commit was cherry-picked onto current main with authorship preserved (commit 66b1142), plus a follow-up tightening commit that replaced the Linux |
cluricaun28
referenced
this pull request
in cluricaun28/Logos
Apr 28, 2026
Replace the Linux/macOS pgrep regex ("hermes.*dashboard") with a ps
scan + the same 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
The old greedy regex would match any cmdline containing both words —
e.g. a chat session whose argv mentions "dashboard" or an unrelated
grafana/dashboard-server process. Added regression tests for both.
Follow-up tightening on #16881.
|
For the memory corruption in long sessions: The fix involves implementing a ring buffer for memory: from collections import deque
class RingMemory:
def __init__(self, max_size=100):
self.buffer = deque(maxlen=max_size)
def add(self, item):
self.buffer.append(item)
def get_recent(self, n=10):
return list(self.buffer)[-n:]
def get_all(self):
return list(self.buffer)
def clear(self):
self.buffer.clear()This prevents unbounded memory growth while keeping the most recent items. |
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
Replace the Linux/macOS pgrep regex ("hermes.*dashboard") with a ps
scan + the same 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
The old greedy regex would match any cmdline containing both words —
e.g. a chat session whose argv mentions "dashboard" or an unrelated
grafana/dashboard-server process. Added regression tests for both.
Follow-up tightening on NousResearch#16881.
donald131
pushed a commit
to donald131/hermes-agent
that referenced
this pull request
May 2, 2026
Replace the Linux/macOS pgrep regex ("hermes.*dashboard") with a ps
scan + the same 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
The old greedy regex would match any cmdline containing both words —
e.g. a chat session whose argv mentions "dashboard" or an unrelated
grafana/dashboard-server process. Added regression tests for both.
Follow-up tightening on NousResearch#16881.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
Replace the Linux/macOS pgrep regex ("hermes.*dashboard") with a ps
scan + the same 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
The old greedy regex would match any cmdline containing both words —
e.g. a chat session whose argv mentions "dashboard" or an unrelated
grafana/dashboard-server process. Added regression tests for both.
Follow-up tightening on NousResearch#16881.
dannyJ848
pushed a commit
to dannyJ848/hermes-agent
that referenced
this pull request
May 17, 2026
Replace the Linux/macOS pgrep regex ("hermes.*dashboard") with a ps
scan + the same 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
The old greedy regex would match any cmdline containing both words —
e.g. a chat session whose argv mentions "dashboard" or an unrelated
grafana/dashboard-server process. Added regression tests for both.
Follow-up tightening on NousResearch#16881.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
Replace the Linux/macOS pgrep regex ("hermes.*dashboard") with a ps
scan + the same 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
The old greedy regex would match any cmdline containing both words —
e.g. a chat session whose argv mentions "dashboard" or an unrelated
grafana/dashboard-server process. Added regression tests for both.
Follow-up tightening on NousResearch#16881.
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
Replace the Linux/macOS pgrep regex ("hermes.*dashboard") with a ps
scan + the same 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
The old greedy regex would match any cmdline containing both words —
e.g. a chat session whose argv mentions "dashboard" or an unrelated
grafana/dashboard-server process. Added regression tests for both.
Follow-up tightening on NousResearch#16881.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16872
What
After a successful update, scan the process table for running
hermes dashboardprocesses and print a warning with their PIDs and restart instructions. Mirrors the existing pattern for gateway processes (lines 6809-7135 inmain.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
nohupor background process. Whenhermes updatereplaces 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 viapgrep(Linux/macOS) orwmic(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
hermes dashboard --port 9119 --no-openin a terminalhermes update(or the test suite)