Feature request: --session-name CLI flag for naming sessions at startup
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
namefield insessions-index.json(distinct from the auto-generatedsummary) - The name appears in the
--resumepicker and VSCode session list - If both
nameandsummaryexist,nametakes precedence in display - Works with
--resume,--worktree, and subagent spawning
Alternatives considered
- Editing
sessions-index.jsondirectly — fragile, concurrent write risk - Relying on auto-generated
summary— not controllable, often too generic - Using
--session-idwith 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).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗