#'hermes' not found on host

1 messages · Page 1 of 1 (latest)

hazy widget
#

I was working with my hermes agent through discord and gateway service when Hermes became unresponsive. I ssh'd into my host and verified hermes config directory etc still exist. Discord bot reports when I try to run /debug:

Sorry, I encountered an error (ModuleNotFoundError).
No module named 'hermes_cli.dump'
Try again or use /reset to start a fresh session.

When I run hermes chat on the host I get this:

hermes@hermes:~/.hermes$ hermes chat
Command 'hermes' not found, did you mean:
  command 'heroes' from deb heroes (0.21-18)
Try: sudo apt install <deb name>

I get a similar message when executing hermes debug. I think the last thing I tried to ask it to do was cleanup stale profile aliases. I previously had about 8 profiles, now there's only 3, and it seems the default was removed. The only logs in .hermes/logs are errors.log and gateway-restart.log

errors.log

cat .hermes/logs/errors.log
2026-05-20 14:07:07,946 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:07,975 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:08,979 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:09,006 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:10,009 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:10,039 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:11,041 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:11,072 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:12,069 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:12,100 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:13,101 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:13,133 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:14,177 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:15,208 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:16,238 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:17,267 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:07:18,294 WARNING hermes_dashboard_plugin_kanban: Kanban event stream error: no such table: task_events
2026-05-20 14:16:29,651 WARNING hermes_cli.web_server: plugins/hub failed: No module named 'hermes_cli.plugins_cmd'
2026-05-20 14:16:43,874 ERROR hermes_cli.web_server: Failed to spawn gateway restart
Traceback (most recent call last):
  File "/home/hermes/.hermes/hermes-agent/hermes_cli/web_server.py", line 720, in restart_gateway
  File "/home/hermes/.hermes/hermes-agent/hermes_cli/web_server.py", line 697, in _spawn_hermes_action
  File "/home/hermes/.local/share/uv/python/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/hermes/.local/share/uv/python/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/hermes/.hermes/hermes-agent'
#

I just verified /home/hermes/.hermes/hermes-agent path does not exist anymore 🙁

final saddle
#

This looks like the Hermes code/install tree is missing from the place the running dashboard/gateway process was loaded from.

The stack trace is the important part:

/home/hermes/.hermes/hermes-agent/hermes_cli/web_server.py

and then restart fails with:

FileNotFoundError: [Errno 2] No such file or directory: '/home/hermes/.hermes/hermes-agent'

That lines up with the other symptoms. The gateway/dashboard process may still be partially alive, but when it tries to import modules that are not already loaded, /debug fails with No module named 'hermes_cli.dump'. When the dashboard tries to restart the gateway, it tries to spawn from the project directory it was launched from, and that directory no longer exists. The shell saying hermes: command not found means the CLI entrypoint is not available in that user’s PATH either.

Please do not delete anything else yet. First make a local backup of the current Hermes home so we preserve config, profiles, logs, and any remaining state:

tar -czf ~/hermes-home-before-repair-$(date +%Y%m%d-%H%M%S).tgz ~/.hermes

Then check whether the code directory exists somewhere else on the host:

whoami
echo "$HERMES_HOME"
command -v hermes || true
ls -la ~/.hermes
ls -la ~/.local/bin/hermes 2>/dev/null || true
find ~ /usr/local/lib -maxdepth 3 -type d -name 'hermes-agent' 2>/dev/null

If no hermes-agent directory is found, reinstall Hermes for the same user account:

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

Then open a new shell and verify the CLI is back:

command -v hermes
hermes --help

After that, reinstall/restart the gateway service using the same service mode you originally used. If it was a normal user service:

hermes gateway install --force
hermes gateway start

If it was installed as a system service, pause before reinstalling the service and say so, because the command needs to match that system-service setup.

Please also paste ~/.hermes/logs/gateway-restart.log after the backup. That should tell us whether only the code checkout/CLI entrypoint disappeared, or whether the profile cleanup removed additional state.

hazy widget
#

hermes-agent was nowhere to be found so I reinstalled hermes per your instruction. The gateway-restart.log only has this entry:

=== gateway-restart started 2026-05-20 14:16:43 ===
final saddle
#

That confirms the missing checkout was the immediate problem.

The empty gateway-restart.log also makes sense with the earlier traceback: the dashboard created the restart log header, then failed before it could spawn hermes gateway restart, because the working directory /home/hermes/.hermes/hermes-agent no longer existed.

Now that Hermes is reinstalled, the next thing is to verify the CLI and gateway service are attached to the new install path:

command -v hermes
hermes --help
hermes gateway status

If hermes gateway status says the service definition is outdated, missing, or not running, reinstall the user service:

hermes gateway install --force
hermes gateway start
hermes gateway status

If the gateway had originally been installed as a system service, use the system-service path instead and tell us before changing it.

After the gateway is running again, try /debug once from Discord. If /debug still fails, paste the new error plus the latest few minutes from:

~/.hermes/logs/errors.log
~/.hermes/logs/gateway.log

The original gateway-restart.log is not useful beyond confirming the restart failed before a subprocess was created.

hazy widget
#

Understood. I've installed the gateway, verified hermes command exists and works. how do i restore my sessions/memory/soul etc

final saddle
#

If you reinstalled into the same Linux user and did not delete ~/.hermes, most of that state may already still be there.

The installer keeps existing ~/.hermes/.env and ~/.hermes/config.yaml when they already exist, and user state normally lives outside the code checkout. The deleted path was the code tree:

~/.hermes/hermes-agent

Your sessions, memories, profiles, and SOUL.md normally live beside that under ~/.hermes.

First check what is still present:

ls -la ~/.hermes/config.yaml ~/.hermes/.env ~/.hermes/SOUL.md ~/.hermes/state.db 2>/dev/null
du -sh ~/.hermes/sessions ~/.hermes/memories ~/.hermes/profiles 2>/dev/null
hermes sessions list --limit 10
hermes profile list

If those show your old sessions/profiles, there is nothing special to restore. Restart the gateway and test from Discord.

If those files or directories are missing and you created the backup from the earlier command, do not extract it directly over ~/.hermes yet. First inspect it:

ls -lh ~/hermes-home-before-repair-*.tgz
tar -tzf ~/hermes-home-before-repair-*.tgz | head -80

Then extract it to a temporary folder so we can copy only the missing user state:

mkdir -p ~/hermes-restore-check
tar -xzf ~/hermes-home-before-repair-*.tgz -C ~/hermes-restore-check
find ~/hermes-restore-check -maxdepth 4 \( -name 'SOUL.md' -o -name 'state.db' -o -name 'config.yaml' -o -name '.env' -o -name 'sessions' -o -name 'memories' -o -name 'profiles' \) -print

Before copying database/session files back, stop the gateway so nothing is writing to them:

hermes gateway stop

The important things to restore, if missing, are:

config.yaml
.env
SOUL.md
state.db
sessions/
memories/
profiles/
skills/
cron/
auth.json if present

Do not restore hermes-agent/ from the backup over the fresh install. Restore only the user data above.

After copying the missing state back into ~/.hermes, run:

hermes sessions list --limit 10
hermes profile list
hermes gateway start
hermes gateway status

If hermes sessions list shows the old sessions and hermes profile list shows the old profiles, the state is back.

hazy widget
#

i copied the sessions directory from the backup to the ~/.hermes. I verified the ~/.hermes/sessions/sessions.json has my historical sessions, but when I execute: hermes sessions list --limit 10 it says no sessions found

final saddle
#

sessions/sessions.json is not the session history database. It is the gateway’s session-key index, so seeing your historical Discord/session mappings there does not mean hermes sessions list has the message history available.

hermes sessions list reads ~/.hermes/state.db. Stop the gateway first, then check whether the backup contains the old SQLite state:

hermes gateway stop
tar -tzf ~/hermes-home-before-repair-*.tgz | grep -E '(^|/)state\.db($|-wal$|-shm$)'

If the backup contains those files, restore them together:

mkdir -p ~/hermes-restore-check
tar -xzf ~/hermes-home-before-repair-*.tgz -C ~/hermes-restore-check
find ~/hermes-restore-check -name 'state.db*' -print

Then copy the matching files back into ~/.hermes/:

cp ~/hermes-restore-check/.hermes/state.db* ~/.hermes/

After that:

hermes sessions stats
hermes sessions list --limit 10
hermes gateway start

If the backup does not contain state.db, check whether you were using a profile-specific home before the reinstall:

find ~/hermes-restore-check -path '*state.db*' -print
find ~/.hermes -maxdepth 4 -name 'state.db*' -print

If the only thing available is sessions/sessions.json, that will restore gateway routing state but not the session list/history. The recoverable message history would need to come from the old state.db or from per-session transcript/export files if those exist in the backup.