omp packages

@pi-archimedes/session-name2.11.1

Auto-generate session names after the first exchange

GitHub Actions Published 3 days ago ~2.5K downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@pi-archimedes/session-name

Find the session you meant.

Timestamps and raw hash names don't tell you what a session was for. Session-name gives every session a short, descriptive name based on your first exchange, so pi -r stops being a guessing game.

Install

Standalone:

pi install npm:@pi-archimedes/session-name

Or the full suite instead:

pi install npm:pi-archimedes

New to Pi? Pi itself is a one-time global install and needs Node.js ≥ 22.19.0:

npm install -g --ignore-scripts @earendil-works/pi-coding-agent

After installing Pi, choose one installation command above, then cd into your project and run pi. Inside the session, /login signs you in and /model picks a model — the setup section covers the first run. /reload picks the extension up in a running session.

How it works

  • After the first user + assistant exchange settles, it takes the first exchange (500 characters per side), asks a model to write a 3–8-word title, caps it at 80 characters, and sets the session name — with a final re-check so a name you set yourself can never be overwritten.
  • Manual names win. If you named the session (--name or /name), naming is skipped, and it re-checks before writing.
  • It uses your current model unless you configure another. The title is a separate model call outside the main run — with its own cost, not reflected in the footer's totals. A model setting (e.g. a cheap model) avoids spending your main model on titles.
  • Failures tell you. A failed title request is retried on a later turn, and the provider's error is logged as [archimedes] session-name failed: <provider error>. After three failures in one session it stops trying and shows a single warning: Session naming failed 3 times. Check the model configuration or use /name. The warning is skipped when there's no UI to show it in (pi -p) or if you named the session in the meantime. Cancelling a request doesn't count as a failure, and neither does a session that's replaced or torn down while a title is in flight.
  • Skips — Ephemeral sessions (no session file) are skipped, and so is a model with no configured auth. Neither counts against the three attempts.

Settings

~/.pi/agent/settings.json, under archimedes.sessionName (strict JSON):

Setting Type Default Description
model string (current model) Model used for title generation (e.g. openai/gpt-4o-mini). Canonical provider/id, bare IDs, and thinking-suffix forms are all resolved. Empty = current model.
reasoning string | null minimal Thinking level for the title request: minimal, low, medium, high, xhigh, max, off. Resolved to the nearest level the model supports (warns on change); the option is omitted only when that resolves to "off". off/null therefore request no thinking but can still send a level on models that exclude it — use "minimal" for bounded-small everywhere. Case and stray spaces are tolerated (" Minimal " works). Anything unrecognised is ignored in favour of the default and logged. Only supported levels reach the provider: the setting resolves through pi's clamp to the nearest level the model supports.

model is also editable in the /archimedes panel (Model for naming — Enter to type, blank to go back to the current model); reasoning is JSON-only.

On/off is managed by the suite: toggle via /plugins (archimedes.sessionName.enabled, default on).

← Back to pi-archimedes