Pi Session Manager

Session Viewer

View session conversations with tree navigation, flow visualization, and subagent support.

The session viewer renders Pi's JSONL session files as a rich, interactive conversation. It supports branching conversations, collapsible sections, and multiple visualization modes.

Tree View

The left sidebar shows the conversation as a tree structure. Each node represents a message, with branches at decision points where the conversation forked.

  • Click any node to jump to that message
  • The tree follows the "newest leaf" strategy — clicking a node navigates to the newest descendant in that branch
  • Branch points (nodes with multiple children) show a collapse toggle

Filters

The tree view toolbar provides filters to control which nodes are visible:

FilterShows
DefaultUser + Assistant messages
No ToolsHides tool call nodes
UserOnly user messages
AllEvery entry including metadata
ReadOnly read tool calls
EditOnly edit tool calls
WriteOnly write tool calls

Flow Visualization

Switch to the Flow view for a graph-based visualization powered by React Flow. This mode:

  • Renders the conversation as a directed graph with compact tree layout
  • Collapses linear tool call chains into edge labels (e.g., bash ×2, read, edit)
  • Uses role-based node icons: User / Bot / Wrench / Settings
  • Includes a MiniMap with role-based coloring
  • Click any node to navigate to the corresponding conversation branch

Flow Toolbar

  • Zoom in / out
  • Fit view (auto-zoom to show all nodes)
  • Focus active node

The flow view shares the same filter bar as the tree view.

Collapsible Sections

Tool Calls

Tool calls (bash, read, edit, write, etc.) are rendered as collapsible cards. Toggle all tool calls with Cmd/Ctrl + O.

Each tool call shows:

  • Tool name and arguments
  • Execution result (expandable)
  • Syntax-highlighted code blocks with copy buttons

Thinking Blocks

AI thinking/reasoning blocks are collapsible by default. Toggle with Cmd/Ctrl + T.

When a session is open, press Cmd/Ctrl + F or use the toolbar search button to open the inline message search bar.

The search bar provides:

  • a compact scope filter with All, User + Assistant Messages, and User Messages modes; the message-only scope still includes visible thinking blocks when thinking is shown
  • inline highlighting for every match in the currently rendered user/assistant message history, including generic/custom tool result output shown inside assistant turns when scope is All
  • previous/next navigation with a live current / total counter (Enter / Shift+Enter and Cmd/Ctrl + G / Shift + Cmd/Ctrl + G)
  • exact scrolling to the active match, even when the message list is virtualized
  • full reset via the close button or Esc, which clears the query, restores the default scope, and removes highlights

Configurable Cmd+F Behavior

The Cmd/Ctrl + F shortcut behavior can be customized in Settings → Session → Cmd+F Behavior:

ModeCmd/Ctrl + FCmd/Ctrl + Shift + F
Search in session (default)Open in-session searchToggle session tree sidebar
Toggle session treeToggle session tree sidebarOpen in-session search

This allows users who prefer the previous Cmd/Ctrl + F = toggle sidebar behavior to restore it.

Subagent Sessions

When a session uses subagents (via Pi's subagent tool), the viewer renders clickable cards for each subagent run showing:

  • Agent name and model
  • Duration and token usage
  • Task preview

Click a card to open the full subagent conversation in a modal overlay. The modal reuses the same message rendering components (UserMessage, AssistantMessage, ToolCallList) and supports:

  • Nested subagents (stacked modals with incremental z-index)
  • Thinking/Tools toggles (Cmd/Ctrl + T / Cmd/Ctrl + O)
  • Single, parallel, chain, and management action modes

Subagent artifacts are stored at session-dir/subagent-artifacts/ with the same JSONL format as main sessions. The viewer resolves artifact paths with fallback logic.

Session Content Cache

An LRU cache (5 entries) keyed by file path + modification timestamp speeds up back-navigation. Cache hits skip the file read entirely.

Keyboard Shortcuts

ShortcutAction
Cmd/Ctrl + TToggle thinking blocks
Cmd/Ctrl + OToggle tool call expansion
Cmd/Ctrl + FSearch messages in the open session (or toggle sidebar, configurable)
Cmd/Ctrl + Shift + FToggle session tree sidebar (or search messages, configurable)
Cmd/Ctrl + GNext in-session search result
Shift + Cmd/Ctrl + GPrevious in-session search result
Cmd/Ctrl + EExport & open in browser
Cmd/Ctrl + RResume session in terminal

On this page