Skip to content

Auto session naming

The auto-session-name extension names the session when it has no name yet, using the currently selected model. It sends only user-message history (no tool results, assistant replies, or thinking), caps the name at five words, and runs in the background so it never delays your message. Sessions that already have a name (set manually with /name or generated earlier) are left untouched.

Bundled with Selesai

Loaded automatically with Selesai; no per-extension npm install is required.

Manifest entry
./auto-session-name.ts
Runtime surface
Automatic

Setup and prerequisites

  • Bundled with Selesai and loaded automatically; no separate install is required.
  • Uses the currently selected model and its existing API credentials; if no key is available, naming is skipped.
  • Works in interactive sessions; it names the session as user messages arrive.

What it sets up

  • Listens to the input event and ignores extension-sourced messages, slash commands, and empty text.
  • Only acts when the session has no name yet: if the session already has a name, the naming call is skipped entirely.
  • Collects the current user prompt plus up to 20 previous user messages (newest first, 200 characters each) as the only context.
  • Asks the model for a 1–5 word session name with a 10-token output cap, then applies it via setSessionName.
  • Disables thinking explicitly (reasoning_effort: "none") so reasoning models do not burn the naming budget on internal reasoning.
  • Runs the naming call fire-and-forget in the background; the user message is sent immediately.

What you can configure

Auto session naming is automatic: on every user message it asks the current model for a short name using only user-message history, and never blocks the message send.

No user configuration

This capability does not expose user-editable settings. Its behavior is controlled by the commands and runtime rules documented below.

Source evidence

There are no user-facing settings. The name length, context limits, and token cap are constants in the extension source.

What you can do

  • Get an auto-generated name for a new, unnamed session without running /name manually.
  • Keep a manually set or previously generated name; it is never overwritten by the extension.
  • Send messages without any added latency from the naming call.

Commands, tools, and shortcuts

  • None. The extension is fully automatic.
  • The equivalent manual command remains /name.

Limits and safety

  • Naming is best-effort; a failed or slow naming call never blocks or breaks the message flow.
  • Only the latest message’s naming call may set the name; slower older responses are discarded.
  • The naming request contains user message text only. No tool results, assistant replies, or thinking content are sent.

Source evidence

Selesai version: 0.10.0