How to name a Claude Code session
Use claude --name to label a Claude Code session for the resume picker and terminal title, including when resuming or forking existing work.
Run claude --name <name> when starting a session to set the title shown in the prompt box, resume picker, and terminal title. Use a short outcome such as checkout-webhook-fix, not a generic label such as coding. The name helps retrieval; it does not change the project directory or session ID.
When to use it
Claude Code can infer a title from the conversation, but an explicit operational name is easier to scan when one repository has several concurrent tasks. Names are especially useful before backgrounding a session or after creating a fork.
Use it safely
1. Name the outcome
Start with a few words that describe the deliverable or incident. Avoid dates as the only identifier because the picker already has chronology.
claude --name checkout-webhook-fix2. Combine the name with the first instruction
A positional prompt can start the named session immediately. Quote names or prompts that contain shell spaces.
claude --name checkout-webhook-fix "Reproduce the duplicate event and add a regression test."3. Name a deliberate fork
When branching an old conversation, attach a name that states how this path differs. The new session ID remains the durable identity even if two display names happen to match.
claude --resume <id> --fork-session --name checkout-idempotency-altImportant distinctions
- A display name is not a filesystem-safe slug and should not be used as a script's only session identifier.
- Naming does not move a conversation between projects; the recorded working directory still controls project grouping.
- Do not put customer names, secrets, or access tokens into a title that may appear in terminal chrome or screenshots.
Where Crowsnest fits
Crowsnest's local gallery makes Claude's session title searchable beside project, provider, and message content. Clear names improve that browsing experience without changing transcript bytes or provider behavior.
Source and version
The exact text and flags on this page were checked against the installed Claude Code 2.1.286 binary on October 9, 2026. Version-specific behavior can change, so compare your own --help output before scripting around it. Official CLI documentation →
Reviewed from first-party CLI output and the released Crowsnest product source. No command on this page bypasses provider limits, billing, authentication, or native history rules.