Session history

Where sessions are stored, how to resume and branch them, automatic labels, compaction with recall, and export.

Where sessions are stored

Jouzu saves each conversation as a session: a JSONL file under the sessions directory of the state root in the locations table, separate from any stock Pi installation. Sessions save automatically unless you start Jouzu with --no-session, in which case the run is ephemeral and cannot be resumed.

The active branch of a session supplies conversation history for the next model request, combined with the system prompt, discovered context files, available tools, and loaded skill descriptions.

Resume or switch sessions

From the terminal, jz --continue opens the most recent session for the current directory, jz --resume opens the session picker, and jz --session <id> opens a specific session; Jouzu prints that command, with the ID filled in, when a session exits.

Terminal
jz --continue      # most recent session in this directory
jz --resume        # session picker
jz --session <session-id>

In a session, /resume opens the same picker and /new starts a new session. The picker can search, rename, and delete sessions, show paths, change sorting, and limit results to named sessions.

Each session records the working directory it was created in and never changes it. --continue runs in the current directory; --resume, /resume, --session, and /import run in the session's working directory, which can differ. If that directory no longer exists, interactive mode asks whether to continue in the current directory, fork the session into it as a new session, or cancel.

Branches: tree, fork, clone

Sessions are stored as a tree, so returning to an earlier point does not erase the branch you leave. The model receives only the active branch, not every branch in the session file.

ActionResult and use
/treeMoves within the current session file. Select a user message to put its text back in the editor; edit and submit it to create another branch. Use when related alternatives should stay together.
/forkCreates a new session from an earlier user message, running in the current directory. Use when the alternative should become separate work.
/cloneCopies the active branch into a new session at its current position. Use when you want a separate copy of the current state.

When you leave a branch, Jouzu can summarize it and attach that summary to the branch you enter, preserving relevant work from the abandoned path without including every message from it.

Session names and labels

Use /name <name> to assign a recognizable name yourself; naming also pins the name. Automatic naming is on by default in interactive sessions: after the first completed run, a naming request with no tools proposes a session name of at most 60 characters and a pane label of at most 12 lowercase letters, digits, or hyphens. Session names appear in /resume; session IDs, filenames, and workflow lanes do not change.

The naming request includes the working folder name, the Git repository name, and bounded excerpts of your queries, with absolute paths and common credential prefixes redacted. It is not a general secret detector: do not include secrets in task text.

CommandEffect
/labelsShow naming status and the complete command list without changing anything.
/labels on / /labels offEnable naming with the selected model, or cancel pending naming and stop requests while keeping the name.
/labels global on / /labels global offSave the global switch shared with Settings → Auto labels. Both switches must be on for naming.
/labels pin / /labels autoProtect the session name, or allow automatic replacement.
/labels pane pin / /labels pane autoProtect this pane's title, or explicitly allow replacing it.

Compaction and recall

When the active context approaches the model's limit, Jouzu compacts the older history. Compaction is based on VCC and runs without a model call: it shortens the active transcript while running work continues, and it does not delete the original session entries.

Compaction summaries retain a recall range for indexed user requests and later corrections. The agent is instructed to read those requests before continuing, and vcc_recall retrieves details from the current session, including entries removed from the active transcript. In an interactive session, /pi-vcc-recall does the same for you; plain keywords work best, and scope:all reaches edited or retried turns.

  • vcc_recall retrieves history; it cannot start compaction.
  • compact_context lets the agent request compaction explicitly. Compaction waits until the current run settles and queued messages have been handled; a failure reports the problem without automatically continuing.
  • /compact [instructions] compacts manually, optionally telling the summary what to preserve.
  • /pi-vcc compacts with the structured summary directly.

Export and share

CommandWhat it does
/copyCopy the last agent message to the clipboard.
/export [path]Write the session as HTML by default, or as JSONL when the path ends in .jsonl.
/shareUpload the session and return a viewer link, using a Radius artifact when Radius authentication is configured and otherwise a private GitHub gist.
/import <path>Import a JSONL session, preserving its ID and working directory.