pi-title

Automatic session titles for the Pi coding agent

Packages

Package details

extension

Install pi-title from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-title
Package
pi-title
Version
0.1.8
Published
Oct 9, 2026
Downloads
1,139/mo · 263/wk
Author
brettinternet
License
MIT
Types
extension
Size
38.6 KB
Dependencies
1 dependency · 1 peer
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-title

Title each session from its first request, and optionally refresh it as the conversation develops. Manual titles are never replaced automatically.

pi install npm:pi-title
/title                          show title and config
/title My custom title          set a title
/title set status               set a title that matches a subcommand
/title regenerate               retitle from recent messages
/title every 4                  retitle every 4 answered turns
/title every off                title once
/title on                       enable automatic titles
/title off                      disable automatic titles
/title model openai/gpt-5-nano  use a specific model
/title model auto               use a lightweight model
/title model active             use the session's model

Configuration

// ~/.pi/agent/pi-title.jsonc
{
  "enabled": true,
  "model": null,       // null = session model, "auto", or "provider/model[:effort]"
  "maxTokens": 30,
  "maxLength": 60,
  "refreshTurns": 0    // retitle every N answered turns; 0 = title once
}

Refreshing titles

"refreshTurns": 4

turn 1  → initial title from the first request
turn 5  → refreshed from recent messages
turn 9  → refreshed again

Refreshes read the last 8 user and assistant messages (up to 4,000 characters, no tool output). Naming the session yourself stops them.

Model fallback

The configured model is tried first. If it is unavailable, fails, or returns no usable title, the active session model is tried next. Each distinct model is attempted once; the extension does not retry. Cancellation stops the chain.

Fallback is automatic, including for explicitly configured models. The session model may cost more than the configured title model. Both calls use the title token budget. Using /title model active uses only the session model.

When fallback succeeds, the UI warning names the failed model and the model used. If neither model works, the error includes both failures.