Skip to main content
Every conversation is a session with a transcript on disk and a persistent Python kernel. This guide covers the commands you’ll use day-to-day. For the theory see Sessions.

Save and resume

Sessions save automatically. To pick up where you left off:
List recent sessions:

Fork a session

To try a different direction from a specific point without losing the original:
You get a new session that shares history up to the branch point and diverges after. Fork depth is tracked with rlmDepth on the session header.

Branch inside a session

The agent creates its own branches when it needs to explore alternatives. Each branch gets a summary (createBranchSummaryMessage) so switching between branches doesn’t blow the context window.

Compaction

Long sessions get compacted when they approach the model’s context limit. The compaction pipeline (compact, calculateContextTokens, prepareBranchEntries) trims low-value entries and keeps decisions, plans, and results. Every compaction is recorded in the transcript so you can see what was dropped and why.

Where transcripts live

~/.prime/agent/sessions/. Each session is a single append-only file with entries of type message, custom_message, compaction, branch_summary, or git_state. The web UI has a session list with full-text search. From the CLI:
Search is capped at SESSION_LIST_SEARCH_TEXT_MAX_CHARS (64 KB) per entry so large transcripts stay fast.
Last modified on August 17, 2026