Using PiLot Studio

Sessions and history

Browse, rename, fork, delete, and export PiLot Studio sessions, and choose where PI stores them on disk.

Last reviewed October 25, 2026 · 4 min read

Browse the wiki

PiLot Studio uses PI's session files directly. A conversation you start in the sidebar is the same session you can open in the Pi CLI, and a CLI session appears in the History tab when it belongs to the current workspace.

The History tab

Open History with the clock icon or press 2.

  • Sessions are listed newest first with their name, relative time, and message count.
  • The search box filters by session name.
  • Click a session to resume it. The current transcript is replaced by that session's history.
  • The + button starts a new session.
  • Select mode enables checkboxes for deleting several sessions at once. Deletion is permanent and asks for confirmation.
  • A single session can be deleted from its row.

The list is scoped to the current workspace and PI's session directory. If you switch folders, the list changes.

How sessions are named

A new session starts as Untitled (or the first user text, depending on timing). PiLot Studio then derives a name from the conversation:

  • it strips code fences, inline code, Markdown links, and heading markers;
  • it prefers the first substantive assistant line, falling back to the first user message;
  • it caps the name at about 60 characters;
  • it removes the Auto Context preamble so Project Root: ... never becomes a title.

Rename the active session from the header's pencil button or with /name <name>. Renaming writes the name into the session file, so it is visible in the CLI too.

Starting over

  • Header + button or Ctrl+Shift+Alt+N starts a new session.
  • /new does the same from the composer.
  • pi-agent.newSession is available in the Command Palette.

The previous session stays in History; starting a new session does not delete it.

Forking a conversation

Every user message has a Fork here button. Forking:

  1. creates a new session file,
  2. copies the conversation up to that message,
  3. records the original session as its parent,
  4. switches the sidebar to the new branch while leaving the original untouched.

Use it when you want to try a different follow-up or model without losing the current branch. The fork is a normal session and appears in History.

/tree simply opens the History tab; PiLot Studio does not render a visual tree graph. The parent/child relationship is stored by PI and visible through the linked sessions.

Exporting

Open the export dialog from the download button above the composer. Three formats are offered:

Format Intended use 3.0.0 behavior
HTML A self-contained, syntax-highlighted transcript for sharing. Works.
JSONL Machine-readable PI session data for archival or tooling. Works.
Markdown Plain-text notes. The option is present, but 3.0.0 routes it through the HTML exporter, so the resulting .md file contains HTML. Use HTML or JSONL instead.

The /export command accepts a path or an extension:

/export
/export .html
/export .jsonl
/export ./notes/session.jsonl

With no argument, it writes pi-session-<short-id>.html in the workspace root. The dialog writes to the path chosen by the host; the result message reports where the file landed.

Export is read-only with respect to the session. It does not delete or compact anything.

Where sessions live

Sessions are stored in PI's agent directory, by default ~/.pi/agent. pi-agent.sessionDir adds an optional subdirectory inside that agent directory. Both are resolved when the extension activates, so reload the VS Code window after changing them.

~/.pi/agent/
  sessions/
  auth.json
  models.json
  settings.json
  mcp.json
  trust.json

The History tab uses the same PI session manager as the CLI, so deleting a session here removes the underlying file. Back up anything you want to keep.

Resuming after a restart

PiLot Studio reopens the sidebar with the session list, and you can click any session to resume it. If PI cannot resume a session with its original model, it falls back and surfaces a notice in chat instead of switching silently.

The manifest setting pi-agent.restoreLastSession is declared for compatibility but is not read by the 3.0.0 runtime; open the session from History if you want to continue after a window reload.

Session data and privacy

Session files contain your prompts, the model's replies, tool calls, and tool output. They can include source code and paths. Treat the agent directory like any other local project data, especially if you back it up or sync it.

Something inaccurate or missing? Open an issue with the page title.