Artifact 52e8ee5c8ec4bac328cd5c159349f7fcf0e55952b7fbb70b24335cae24c52ebb:
- File docs/manual/sessions.md — part of check-in [d66dc3f8af] at 2026-11-21 11:05:58 on branch docs-reorg — docs: short README; manual, reference, dev, design and archive under docs/; AGENTS.md; docs.sh checks docs against code; changelog.inc built at build time (user: dmestas, size: 1749) [annotate] [blame] [check-ins using] [more...]
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. 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.