Feature: Named sessions via --session <name> flag for easier session management
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Summary
Add support for named sessions so users can create, resume, and manage Claude Code sessions by a human-readable name instead of a UUID.
Problem:
Today, session management works like this:
- Sessions are stored as UUIDs (e.g. 99291a8e-d549-484b-b418-9bae19b9a3e1.jsonl) under ~/.claude/projects/<project>/
- claude --resume shows a list ordered by timestamp with the working directory — no user-defined label
- There is no way to jump directly to a known session without scrolling the resume list
This becomes painful when:
- A project has multiple long-running sessions with distinct purposes (e.g. "feature-auth", "bug-payment-race", "refactor-ledger")
- A user works across several projects and wants to resume a specific session without hunting by timestamp
- Session history grows over weeks — the resume list becomes a wall of identical-looking UUIDs
Non-Goals
- This does not change how session history is stored (.jsonl files remain the source of truth)
- No cloud sync — local only, consistent with current session storage
- Does not replace --resume — both can coexist
Environment
- Claude Code CLI
- Platform: Windows / macOS / Linux (CLI-level change, platform-agnostic)
Proposed Solution
Proposed Solution
Introduce a --session flag and a lightweight name → UUID index stored in ~/.claude/sessions-named.json.
Commands:
Create a new session with a name, or attach if name already exists
claude --session <name>
List all named sessions (name, project path, last used)
claude --sessions
Rename an existing named session
claude --session <name> --rename <new-name>
Delete a named session entry (does not delete the underlying .jsonl history)
claude --session <name> --delete
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
Example workflow:
$ claude --session block-c-additions
Creates new session tagged "block-c-additions", resumes it next time
$ claude --sessions
NAME PROJECT LAST USED
block-c-additions F:\Projects\practice 2026-06-21 09:14
auth-refactor D:\tradingApp\backend 2026-06-20 17:42
ledger-design D:\tradingApp\backend 2026-06-18 11:05
$ claude --session auth-refactor
Resumes that session directly, no list to scroll through
Storage format (~/.claude/sessions-named.json):
[
{
"name": "block-c-additions",
"sessionId": "99291a8e-d549-484b-b418-9bae19b9a3e1",
"project": "F:\\Projects\\practice",
"createdAt": "2026-06-20T08:00:00Z",
"lastUsedAt": "2026-06-21T09:14:00Z"
}
]
Additional Context
Why This Matters
Users doing long-running, multi-session work (feature development, interview prep, research projects) currently have no ergonomic way to navigate sessions. Named sessions lower the friction to resume the right context immediately, which is especially valuable given that session context directly affects Claude's output quality.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗