pi-tty7-tab-namer

Auto-name pi sessions with an LLM and sync the name to the tty7 tab title. Manual /name always wins.

Packages

Package details

extension

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

$ pi install npm:pi-tty7-tab-namer
Package
pi-tty7-tab-namer
Version
0.1.2
Published
Oct 9, 2026
Downloads
509/mo · 212/wk
Author
ifyour
License
MIT
Types
extension
Size
24.5 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "extensions/*.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Install

Prerequisite: run pi inside the tty7 terminal (this extension only activates in a tty7 environment).

pi install npm:pi-tty7-tab-namer

That's it — nothing else to do. Names are also written to session metadata, so they show up readable in the /resume session list.

Usage

Scenario Behavior
First message in a new session Tab automatically shows a short (≤10 char) title
Loading an unnamed historical session Names the whole session from the last 10 messages, not just the newly appended one
/name custom Tab updates immediately, and auto-naming stops for that session
Manually renaming the tab in tty7 Session name syncs immediately, and auto-naming stops (same as /name)
Resuming a named session Tab shows the name immediately
Quitting pi Tab falls back to the default tty7 title

Features

  • Auto-naming: on the first message, calls the current session model in parallel to summarize intent into a title, without blocking the conversation
  • Two-way sync: manual tab rename in tty7 → writes the pi session name; naming inside pi → updates the tab
  • Manual wins: after /name or a manual tty7 rename, auto-naming never overrides
  • Full lifecycle: tab title follows the session name on new / resume / fork / quit
  • Race-safe: switching or quitting while a naming request is in flight discards the result, never writing to the wrong session; 20s timeout with automatic retry on the next turn
  • Subagent isolation: when the main session spawns subagents, child sessions never touch the tab title or session name (compatible with all pi sub-session mechanisms, e.g. pi-subagents and the built-in Task tool)

FAQ

Does it work in other terminals (iTerm2, etc.)?

Not currently — this extension targets tty7 only.

Does it auto-rename after multiple turns?

A session is named once (unless done manually).

Does the model call cost money?

Each naming run is one tiny request (a few hundred tokens), triggered only the first time for an unnamed session.

Development

git clone https://github.com/ifyour/pi-tty7-tab-namer
cd pi-tty7-tab-namer
npm test          # self-check for title sanitization logic
pi -e .           # try locally

License

MIT