Save and resume
Sessions save automatically. To pick up where you left off:Fork a session
To try a different direction from a specific point without losing the original: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.
Search
The web UI has a session list with full-text search. From the CLI:SESSION_LIST_SEARCH_TEXT_MAX_CHARS (64 KB) per entry so large transcripts stay fast.