Sessions

This page covers how Huginn saves conversations, how to pick up where you left off, and what happens when a session grows long enough to hit context limits.

What a session is

A session is a saved conversation thread. Every message you send, every file the agent reads, every tool call it makes — all of it is part of the session and stored on disk.

Sessions survive restarts. Close Huginn, reopen it, and every conversation is exactly where you left it. Nothing is lost between runs.

Sessions are automatically named from your first message. The web UI shows all sessions in the left sidebar.


Starting a session

Web UI: Click New Session in the left sidebar to start a fresh conversation.

TUI: Each huginn launch creates a new session automatically.


Resuming a past session

Web UI

Click any session in the left sidebar. The full message history is restored. You can continue from where you left off, including any code changes the agent made.

TUI — /resume

Open the session picker overlay:

/resume

Select a previous session by number or name to restore the full message history.

One session per project is a good default. The agent retains full context of earlier decisions, what files changed, and why. Starting fresh sessions drops that context.


Renaming a session

Sessions are auto-named from the first message. You can rename them at any time.

Web UI: Click the session name in the sidebar.

TUI:

/title Auth refactor — March sprint

Session names appear in the sidebar and in the /resume picker.


Context compaction

Every session has a context window — a limit on how much history the model can hold at once. When a session gets long enough to approach that limit, Huginn compacts the older parts automatically.

Compaction summarizes the earlier portions of the conversation and keeps the most recent exchanges in full. It is not lossy: key decisions, code changes, and facts are preserved in the summary. Only the raw word-for-word transcript of old messages is compressed.

compact_mode options

ValueBehavior
"auto"Default. Compacts automatically when the fill ratio hits compact_trigger.
"never"Disables compaction. Not recommended for long sessions — the model will eventually hit its hard context limit.
"always"Compacts at the start of every session, regardless of size.

compact_trigger

Controls the fill ratio that triggers auto-compaction. The value is a decimal from 0.0 to 1.0 representing how full the context window should be before compaction fires.

Default: 0.8 (80% full).

Configure both settings in your Huginn config:

{
  "compact_mode": "auto",
  "compact_trigger": 0.85
}

Raise compact_trigger closer to 1.0 if you want to delay compaction and keep more raw history in context. Lower it if the agent seems to lose track of recent context before compaction kicks in.


Multi-agent sessions

In a session that uses multiple agents, each agent maintains its own history slice. The orchestrator keeps a delegation log that records which tasks were sent to which agents and what came back.

When Steve finishes a coding task and his summary is posted back to the main thread, the orchestrator’s delegation log captures that exchange. The primary agent can refer back to it when making further decisions — it knows what Steve built and what conclusions he reached.

In the web UI, sub-agent work streams into the thread panel on the right side. In the TUI, sub-agent output appears inline in the terminal.


Where sessions are stored

Sessions are plain files on disk at ~/.huginn/sessions/. Each session is a directory containing its message history.

Back up this directory before reinstalling or wiping your home directory. If the directory is gone, the sessions are gone.


Cross-session memory

Within a session, the agent remembers everything automatically. Across separate sessions, context does not carry over by default.

To give an agent persistent knowledge that survives across sessions, you have two options:

Context notes — a plain Markdown file at ~/.huginn/agents/<name>.memory.md. Enabled per-agent with context_notes_enabled: true. The file is read at session start and injected into the agent’s context. No external service required.

MuninnDB — a cognitive memory engine. At session start the agent recalls relevant memories from its vault; at session end Huginn writes 1–5 key learnings back. Configure the endpoint:

export HUGINN_MUNINN_ENDPOINT=http://localhost:8765

For full memory configuration details, see the Named Agents page.


Session command reference

CommandWhat it does
/resumeOpen the session picker to restore a previous session
/saveForce-save the current session to disk immediately
/title <text>Rename the current session