- TypeScript 100%
pi-session-scribe #
A Pi extension that silently creates short, descriptive session names and keeps them relevant as the conversation develops.
How it works #
Session Scribe waits until the first user/assistant exchange is complete before creating a name. It then reviews the name at progressively wider intervals:
user turns 1 → 3 → 8 → 16 → 28 → 44 → 60 → ...
A review may happen sooner when there is a large amount of new user text or the active conversation branch changes. The model can return <KEEP> when the current name still describes the session.
For each review, the extension provides:
- the current session name;
- the opening request;
- a bounded selection of recent user and assistant text.
Tool results, tool calls, thinking, images, system prompts, and abandoned branches are excluded. Provider failures use a simple retry backoff. Automatic naming runs silently; it does not show status text or notifications.
Manual names always win #
Names supplied with --name or /name are treated as manual. Renaming a session stops automatic updates for that session and cancels any review in progress.
Use /session-scribe auto or /session-scribe now to return the session to automatic naming.
Install #
Install the Pi package from GitHub:
pi install npm:@mayask/pi-session-scribe
Restart Pi or run /reload in an existing session.
For one-run testing:
pi -e npm:@mayask/pi-session-scribe
Commands #
| Command | Effect |
|---|---|
/session-scribe |
Show the current naming status |
/session-scribe now |
Generate or review the name immediately |
/session-scribe auto |
Resume scheduled automatic updates |
/session-scribe off |
Stop automatic updates for this session |
The current name is left unchanged when automatic updates are disabled.
Naming model #
By default, Session Scribe uses the session's active model. To select another configured Pi model:
export PI_SESSION_SCRIBE_MODEL="provider/model-id"
Or for one invocation:
pi --session-scribe-model provider/model-id
To disable automatic naming for a process:
export PI_SESSION_SCRIBE_DISABLED=true
You can also use --session-scribe-off for one invocation. /session-scribe now remains available as an explicit override.
The selected naming model receives only the bounded active-branch excerpt described above.
Development #
git clone https://github.com/mayask/pi-session-scribe.git
cd pi-session-scribe
npm install
npm run check
License #
MIT