--name
A Claude Code CLI flag, read out of the shipped bundle. It has been in the build since v2.1.138, including the newest one read.
What it is
Set a display name for the session, shown in /resume and the terminal title. You can resume a named session with claude --resume <name>. In an interactive session, if another live session on this machine already uses the name, Claude Code applies [a variant of it](/docs/en/sessions#name-your-sessions) instead. <br /><br />[/rename](/docs/en/commands) changes the name mid-session and also shows it on the prompt bar
Anthropic's own wording. Read off CLI reference, captured 2026-08-28.
Presence across releases
| Releases | Reading | Declared type | Default |
|---|---|---|---|
| 2.1.245 – 2.1.250 5 releases | never mined | — | — |
| 2.1.138 – 2.1.243 95 releases | in the build | — | — |
A row reading never mined is a release with no archived bundle behind it. Nothing was read out of it, so nothing here says whether the name was in it. A declared type or a default is only ever what that release's own bundle stated.
Changelog entries naming it
-
v2.1.246Background workers are launched with a name
Background workers are spawned with a --name argument identifying them.
named in this entry
-
v2.1.232Background session names can be marked as chosen to avoid a collision
Background session names auto-changed to dodge collisions now survive respawn like ones you chose.
named in this entry
-
v2.1.223Cloud sessions started with a title rename themselves instead of auto-titling
Cloud sessions you start with --name keep that name instead of being overwritten by a generated title.
named in this entry
-
v2.1.221Background session names starting with "-" survive respawn
Background sessions renamed to something starting with a dash now restart correctly.
named in this entry
-
v2.1.221Session titles are normalised and blank titles rejected
Session titles are trimmed and cleaned, and blank ones are simply ignored instead of set.
named in this entry
Documentation pages
- CLI reference reference table Claude Code CLI
- deploy-helm mentions it Claude Developer Platform
- using mentions it Claude Developer Platform
- admin-api mentions it Claude Developer Platform
- cmek-azure-key-vault mentions it Claude Developer Platform
- wif-admin-api mentions it Claude Developer Platform
- aws mentions it Claude Developer Platform
- Create the app registration that represents the Claude API audience. mentions it Claude Developer Platform
- workspaces mentions it Claude Developer Platform
- memory mentions it Claude Developer Platform
- Manage multiple agents with agent view mentions it Claude Code CLI
- Claude Code changelog mentions it Claude Code CLI
- Deploy Claude apps gateway on AWS mentions it Claude Code CLI
A reference table page is one whose own table defines this name, and it is where the description above came from. A page that mentions it carries the name somewhere in its text and may say nothing about it at all. Every page carrying it.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the CLI flag does. All CLI flags.