# Sessions
A session is a conversation in the workspace's journal, `WORKSPACE/.pic/journal.sqlite`. `pic
sessions` lists them, `pic log [ID]` shows one's entries, `pic name ID NAME` names one, and `-c` or
`--session ID` continues one in `ask`, `chat`, `tui` and RPC mode.
## Forking
**`/fork`** with no argument opens Pi's "Fork from Message" picker of your earlier messages: Enter
forks the path before the chosen message into a new conversation and puts that message in the
editor. `/fork ENTRY` forks after an entry (see `pic log`). On the command line, `pic fork ID --at
ENTRY` does the same.
## Compaction and branch summaries
Compaction and branch summaries take Pi's settings, in Pi's `settings.json` shape (`pic settings
compaction '{"reserveTokens":16384,"keepRecentTokens":20000}'`): `compaction.enabled` (default true;
off stops automatic compaction, overflow recovery included, as in Pi, but not `pic compact`;
`/settings` Auto-compact and the RPC command `set_auto_compaction` set it),
`compaction.reserveTokens`, `compaction.keepRecentTokens`,
`compaction.modelOverrides["provider/model"]`, `branchSummary.reserveTokens` and
`branchSummary.skipPrompt`. Leaving a branch in `/tree` asks Pi's "Summarize branch?"; a summary
(`pic fork ID --at ENTRY --summarize`) is a journaled, priced request, and the new conversation
starts with Pi's `branch_summary` entry.
The defaults are in [settings](../reference/settings.md). `pic compact [ID [INSTRUCTIONS]]` and
`/compact [FOCUS]` compact before the next request.
## Exporting
`pic export --html ID` writes a conversation as one self-contained HTML page, `pic export --pi`
writes conversations as Pi session lines, and `pic import PATH` reads a Pi session back as a new
conversation.