Feature request: --session-name CLI flag for naming sessions at startup

Resolved 💬 3 comments Opened Mar 4, 2026 by CogitoH Closed Mar 8, 2026

Summary

Add a --session-name <name> CLI flag that lets users assign a human-readable name to a session at creation time, making it easier to identify sessions in the resume picker and VSCode session list.

Motivation

v2.1.63 added session rename/remove in VSCode, but there's no CLI equivalent. This matters especially for multi-agent workflows where many sessions run in parallel (subagents, background agents, worktree-isolated agents). The resume picker (--resume) currently shows auto-generated summaries that are often cryptic or duplicated.

Use case: In a multi-agent system with persistent project identities, each agent session could be named at startup (e.g., claude --session-name "archiviste — vault research") so the session list becomes navigable without having to inspect each session's content.

Proposed behavior

claude --session-name "my descriptive name"
  • Sets a name field in sessions-index.json (distinct from the auto-generated summary)
  • The name appears in the --resume picker and VSCode session list
  • If both name and summary exist, name takes precedence in display
  • Works with --resume, --worktree, and subagent spawning

Alternatives considered

  • Editing sessions-index.json directly — fragile, concurrent write risk
  • Relying on auto-generated summary — not controllable, often too generic
  • Using --session-id with a known UUID — identifies but doesn't name

Context

This would complement the VSCode rename feature by making it available to CLI-first and headless workflows, which is where session management is most needed (CI, SDK, multi-agent orchestration).

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗