Wiki · Features in depth

Sessions and recovery

Closing the terminal loses nothing: conversations are saved automatically, can be found, resumed and handed over elsewhere. Hermes also looks after them.

✅ Verified 16. 10. 2026Source: official documentation →📋 Copy for your AI
🗂️
Every conversation is saved by itself — including what the agent did. Closing the terminal loses nothing. Conversations can be found again, resumed in another window and even handed over to another platform. You do not need to copy anything into notes.

What a session is

One conversation = one session. It is stored in a single database, so it can be searched and resumed weeks later:

Where it livesWhat is in it
~/.hermes/state.dbAll conversations and their state: messages, tool calls, results, timestamps, token counts, the session title
Memory (memories/)Only short notes that apply forever — see Agent memory

The database runs in a mode that allows readers and one writer at the same time — which is why several parts of Hermes (interfaces, the messaging gateway, scheduled jobs) can look into it without locking each other out.

Resuming a conversation

❯ hermes -c # the latest conversation in this terminal ❯ hermes -c "my project" # by title ❯ hermes --resume 20260409_000000_aa11bb # by session id ❯ hermes --resume latest --in ./project # the latest one for this folder
With several terminals openWhat happens
You run hermes -c in each of themEach window resumes its own conversation, not the globally most recent one
The conversation was deleted or the breadcrumb is over 30 days oldIt falls back to the latest existing conversation
You want this offsession.terminal_continue: false in the settings

Give your conversations names

After the first exchange Hermes invents a short title (three to seven words) so you do not get lost in the list. For your own, use the slash command right in the conversation:

❯ /title website fix ❯ hermes sessions rename 20260409_000000_aa11bb "website fix"

A title must be unique and at most 100 characters; accents and emoji are fine. An automatic title is added once and only if you have not set one yourself.

Overview and housekeeping

What you wantCommand
See recent conversationshermes sessions list (20 by default), … --limit 50
Only from one platform or folderhermes sessions list --source telegram, … --workspace ~/code/project
Summary numbershermes sessions stats
Pin the important oneshermes sessions pin <id>, list them with hermes sessions pinned
Export a conversation (Markdown, HTML, JSON…)hermes sessions export --format md --session-id <id>
Clean up old conversationshermes sessions prune --older-than 30 --dry-run (show first)
Bring history in from another toolhermes sessions import --from claude / --from codex

--dry-run on a cleanup means "just show me what you would delete". Nothing is removed until you run it without that flag.

How the agent searches past conversations

The agent has a tool that searches the whole history. It makes no model calls — it queries the database full-text, so it is fast and invents nothing:

❯ How did we deal with the certificate back then? ❯ Find in our history the exact command we used for the database backup.

The practical difference: memory is what the agent always carries with it (and is therefore short), while history search goes deep — and finds what never fit into memory.

Long conversations and their continuations

Every model has a limited context window. When a conversation overflows, Hermes compresses it and continues in a new session in the same lineage — visible in the list as my project, my project #2, #3. Resuming by title always picks the latest continuation.

SituationWhat to do
I want to compress it myselfThe /compress command inside the conversation
I want a clean start/new — memory is re-read, history stays searchable
I want to continue where I left offhermes -c "project name" — it picks the newest continuation

Conversations across platforms

A conversation is not tied to one interface. You can start it in the terminal and send it to chat on your phone:

❯ /handoff telegram # hand the conversation over to Telegram

On messaging platforms every chat has its own session (direct message, group, thread). When you ask in a group, the agent remembers that group's context — not your private conversations.

Automatic housekeeping

Without maintenance the database would only grow — on running bots and scheduled jobs it reaches gigabytes within weeks. Hermes therefore cleans up old sessions by itself:

SettingDefaultWhat it does
sessions.auto_pruneonOld sessions are pruned at startup (interface, messaging gateway, scheduled jobs)
sessions.retention_days90 daysHow long idle conversations are kept
sessions.min_interval_hours24 hoursHow often the sweep may run at all

The database file only shrinks when there is something to reclaim — that is by design, not a bug. If the setting gets a nonsensical value (negative days, for example), Hermes skips the sweep and logs a warning instead of deleting everything.

Pitfalls from our systems

What happenedWhat to do
After long work, details disappeared from a conversationThe conversation gets compressed when context fills up — that is normal. Details stay in history: just ask ("search our history for…")
We assumed the agent remembered something from a month agoIt was never in memory (which is short). It can be found by searching conversations — but be explicit: "look in the history for how we set up…"
The state database grew to hundreds of megabytesPruning off plus many platform conversations and scheduled jobs. hermes sessions stats, pin the important ones, then prune with --dry-run
Two terminal panes kept resuming the same conversation-c is terminal-aware, so each pane keeps its own — but only once it has run at least once inside. A brand-new pane starts a new conversation

Our tips

TipWhy
Pin or name an important conversationIn a list full of automatic titles you then find the right one in seconds
A new task gets a new conversation (/new)The agent starts with clean context and re-reads what it knows about you
Export before cleaning uphermes sessions export gives you a backup to come back to
Search history instead of trying to rememberThe agent does it full-text and invents nothing — just say what you are looking for

Where next

← Back to the wiki