Resuming Hermes Between SSH and tmux | Generated by AI

Home 2026.06

Question: Suppose we run Hermes Agent in an SSH session of a server, then cancel it and exit. Can we resume it in a tmux session, or vice versa?

Answer:

Core Concepts

Yes, absolutely. You can seamlessly transition your Hermes Agent workspace between raw SSH sessions and tmux sessions. However, it is important to understand exactly how this works based on the framework’s architecture, as there are two completely different ways to accomplish this depending on whether you want to resume the process or resume the state.


Hermes Agent natively abstracts session management into a persistent SQLite state database (state.db). Every conversation, memory context, and tool state is automatically tracked by a unique Session ID or a human-readable title.

If you abruptly kill or disconnect an SSH terminal while the agent is running:

  1. The physical OS process might be terminated by the OS hangup signal (SIGHUP).
  2. The agent’s progress and conversation context are safely stored in the database.

To resume your work inside a tmux session (or vice versa):

hermes --continue
# OR use the shorthand flag:
hermes -c

Note: The --continue or -c flag automatically re-attaches you to your most recent session. If you want a specific past session, you can list them with hermes sessions list and resume via hermes --resume <session-id-or-title>. You can also opt into automated resume behavior in the TUI by setting the environment variable export HERMES_TUI_RESUME=1 in your shell configuration.


Method 2: Resuming via Linux Process Persistence (tmux)

If your true goal is to prevent the agent’s running terminal process from being interrupted at all when you disconnect from SSH, you should launch Hermes inside tmux from the very beginning.


Back Donate