@jhlabs/pi-auto-name
Automatically creates and refreshes readable Pi session names.
Package details
Install @jhlabs/pi-auto-name from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@jhlabs/pi-auto-name- Package
@jhlabs/pi-auto-name- Version
0.1.0- Published
- Aug 27, 2026
- Downloads
- 112/mo · 5/wk
- Author
- jhlabs
- License
- MIT
- Types
- extension
- Size
- 21.4 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Pi Auto Name
A Pi extension that gives sessions readable names and keeps those names aligned with the conversation.
How it works
- Assigns an immediate title derived locally from the first user prompt.
- Refines that title after the first completed agent run using conversation history.
- Refreshes the title after every three additional user messages by default.
- Sends only a bounded selection of user and assistant text to the naming model. Tool output and hidden reasoning are excluded.
- Stops managing a session when its name is changed manually with
/nameor from the resume picker. - Leaves existing manually named sessions untouched.
Refreshes are based on conversation activity rather than wall-clock time, so idle sessions do not make unnecessary model calls.
Install
pi install npm:@jhlabs/pi-auto-name
Alternatively, install the latest source directly from GitHub:
pi install git:github.com/jhlabs/pi-auto-name
Restart Pi after installing, or run /reload in an existing Pi session.
Commands
/auto-name Show status
/auto-name now Refresh immediately from conversation history
/auto-name on Enable and adopt the current session
/auto-name off Stop changing the current session name
/auto-name every 5 Refresh every five additional user messages
State is stored in the session JSONL, so manual overrides and refresh cadence survive resume and reload.
Configuration
Use any authenticated Pi model for title generation:
pi --auto-name-model provider/model-id
The active Pi model is used by default. Change the refresh cadence at startup with:
pi --auto-name-every 5
Naming requests may consume tokens or incur provider costs. Each request uses at most 12,000 characters of bounded conversation history and asks for no more than 96 output tokens.
Development
npm install
npm run check
npm pack --dry-run
Developed against @earendil-works/pi-coding-agent 0.84.3.
License
MIT