← Catalog

pi-session-manager

Session browser for pi coding agent — browse, resume, rename, and delete sessions

Extension

Install

Install with PiG

pig install npm:pi-session-manager

Install with Pi

pi install npm:pi-session-manager
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions/session-manager.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.

pi-session-manager

A session browser extension for the pi coding agent. Browse, resume, rename, and delete sessions from an interactive TUI overlay — without leaving your current conversation.

Install

pi install npm:pi-session-manager

Features

  • Browse sessions — interactive fuzzy-searchable list with age, message count, and working directory
  • Resume — switch to any previous session instantly
  • Delete — remove sessions with a confirmation prompt
  • Rename — give sessions a meaningful name (current session only; use /name for others)
  • Scope toggle — switch between current project and all projects with Tab
  • Status bar — active session name shown persistently in the footer when set

Commands

CommandDescription
/sessionsBrowse sessions for the current working directory
/sessions allBrowse sessions across all projects
/sallShorthand for /sessions all

Keyboard Shortcuts

Inside the session browser:

KeyAction
↑ / ↓Navigate sessions
EnterResume selected session
dDelete selected session
nRename selected session
TabToggle scope (current project ↔ all projects)
EscClose browser

Type to filter sessions by title, message content, or working directory.

How It Works

The extension registers two commands and a session_start hook:

  • On session_start, it reads the active session's name and renders it in the status bar (e.g. 📁 my-feature).
  • /sessions / /sall open a centered overlay built with pi's TUI primitives (SelectList, Container, DynamicBorder).
  • Sessions are loaded via SessionManager.list() (current directory) or SessionManager.listAll() (global), sorted newest-first.
  • The list displays a human-readable title (session name → first message → filename fallback), age, message count, and a shortened working directory path.
  • Resuming a session calls ctx.switchSession(). If the session has a name, the status bar is updated immediately.
  • Rename only works on the currently active session; for other sessions, you must resume first and then use /name.

Requirements

License

MIT