Hermes Agent sessions: search and resume past work

How Hermes stores every conversation, how to name, resume, export and prune sessions, and how the agent searches its own history.

Docs-backed3 min read · Reviewed Oct 20, 2026

Every conversation is a session

Whether you chat in the terminal, through Telegram, from a cron job or via the API server, Hermes records the conversation as a session in a SQLite database at ~/.hermes/state.db. Each session keeps its ID, the platform it came from, the model used, a snapshot of the system prompt, the full message history, token counts, timestamps and a parent session ID. That last field matters later, because it is how Hermes links a conversation to its continuation after compression.

The source tag tells you where a session came from: cli, telegram, discord, slack, cron, api-server and many more. A few internal kinds (oneshot, kanban and tool) are hidden from the TUI, desktop and dashboard pickers so they don't clutter your list.

Naming and resuming

Sessions are easier to find again if you name them. Use /title inside a chat, or hermes sessions rename <id> <title> from the shell. When you exit, Hermes prints a resume command containing the session ID.

  • hermes -c (or hermes --continue): pick up your most recent CLI session with its full history.
  • hermes --resume <id|title|latest> (short form -r): resume a specific session by ID or title.
  • --in <dir>: limit the 'latest session' lookup to one workspace directory.
  • /resume and /sessions inside a chat let you switch without leaving.
  • /new or /reset: start fresh. The docs recommend doing this at natural task or topic boundaries.

Housekeeping from the command line

The hermes sessions command covers the routine maintenance most people eventually need:

  • hermes sessions list, with --source <platform>, --limit N or --workspace <needle> to narrow it.
  • hermes sessions export <file> writes jsonl by default; --format also accepts md, html and others, and --redact strips sensitive content.
  • hermes sessions delete <id> removes one session.
  • hermes sessions prune removes ended sessions older than 90 days by default; add --dry-run first to see what would go.
  • hermes sessions archive hides matching sessions without deleting them, and hermes sessions pin keeps important ones safe from auto-archiving.
  • hermes sessions stats and hermes sessions optimize report on and tidy the database.

How the agent searches its own history

The session_search tool lets Hermes look things up across all stored conversations. It returns the raw stored messages rather than an LLM-written summary, and once it finds a relevant session it can scroll forwards and backwards around a specific message. Queries use standard SQLite full-text syntax: keywords are combined with AND by default, and quoted phrases, OR, NOT and prefix wildcards (deploy*) all work.

Because search runs only on demand and uses no extra model calls, it complements memory nicely. Memory is always in context but tiny; session search is unlimited but has to be asked for. A useful habit is to prompt explicitly: "search our past sessions for the decision about the staging database."

Compression creates linked sessions

When a conversation gets long, Hermes compresses it (automatically, or when you run /compress). Compression starts a continuation session that points back to the original through its parent ID. Titled sessions get numbered continuations such as #2 and #3, and resuming by name picks the newest one in that chain. Pruning keeps older segments as long as a later segment survives, so you don't lose the beginning of a long-running thread.

Messaging sessions don't time out

On Telegram, Discord and other gateway platforms, conversations no longer reset after inactivity or at a daily boundary. They continue until someone sends /new or /reset, with compression handling length. If you relied on older session_reset settings, note that they are now ignored; the docs point to an optional hermes-session-reset-policy plugin if you want timed resets back. In group chats, each user gets their own session by default (group_sessions_per_user: true).

Primary sources

Spotted something wrong or out of date? Tell us on X at @HermesWatcher (opens in a new tab) and we will fix it.

New Hermes Agent updates every day on X. Follow @HermesWatcher

Liked this guide?

Every Hermes Agent change that matters, explained in five minutes.

We'll only use your email to send the newsletter. Unsubscribe anytime. Privacy