pi-session-manager
Session browser for pi coding agent — browse, resume, rename, and delete sessions
Package details
Install pi-session-manager from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-session-manager- Package
pi-session-manager- Version
0.1.0- Published
- Apr 10, 2026
- Downloads
- 177/mo · 20/wk
- Author
- kowssari
- License
- MIT
- Types
- extension
- Size
- 8.3 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions/session-manager.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
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
/namefor 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
| Command | Description |
|---|---|
/sessions |
Browse sessions for the current working directory |
/sessions all |
Browse sessions across all projects |
/sall |
Shorthand for /sessions all |
Keyboard Shortcuts
Inside the session browser:
| Key | Action |
|---|---|
↑ / ↓ |
Navigate sessions |
Enter |
Resume selected session |
d |
Delete selected session |
n |
Rename selected session |
Tab |
Toggle scope (current project ↔ all projects) |
Esc |
Close 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//sallopen a centered overlay built with pi's TUI primitives (SelectList,Container,DynamicBorder).- Sessions are loaded via
SessionManager.list()(current directory) orSessionManager.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
- pi coding agent with TUI support
License
MIT