Bug Description
Session Management: CLI Improvements
TL;DR
Allow starting claude with a session name or context directly from the command line — no extra clicks, no accumulation of unnamed empty sessions.
Problem
Every claude invocation creates a new empty unnamed session. To continue yesterday's work, you have to:
- Open the session list in the UI
- Find the right one (by date? by project? it's unclear)
- Click — only then you get back to context
That's three extra steps for the most common use case.
Additional issues:
- Dozens of empty unnamed sessions accumulate over time
- Switching between projects requires UI navigation instead of terminal commands
- The CLI stops being an entry point with context — it just opens a blank slate
Proposed Changes
P1 — Launch with session name or fuzzy search (high priority)
Behavior:
- If
text matches an existing session name (exact or fuzzy) → resume it
- If no match → create a new session with that name
- No arguments → current behavior (new unnamed session)
P2 — Resume flags (high priority)
claude -r / --resume # resume last session in current directory
claude -r "deploy" # resume session by name
claude --resume --global # resume last session regardless of directory
P3 — Auto-naming sessions (medium priority)
If a session has no name after the conversation ends, the CLI suggests one based on the first message — similar to how ChatGPT names chats. Options:
- Apply automatically without confirmation
- Ask on next launch:
Name this session "nginx setup"? [Y/n]
P4 — Session list in CLI (low priority)
Sessions are scoped to a directory, so the default list shows only the current project.
claude --list [N] # last N sessions in current directory (default: 10)
claude --list --all [N] # last N sessions per project, grouped
Output of --list:
1 deploy setup 2025-03-13 [5 messages]
2 config fix 2025-03-11 [2 messages]
3 (unnamed) 2025-03-10 [1 message]
Output of --list --all:
~/code/home
1 deploy setup 2025-03-13 [5 messages]
2 config fix 2025-03-11 [2 messages]
~/code/ws25
1 survey analysis 2025-03-12 [12 messages]
2 (unnamed) 2025-03-10 [3 messages]
Expected Benefits
| Before |
After |
| 3 steps to resume yesterday's session |
claude -r or claude "deploy" |
| Empty unnamed sessions pile up |
Sessions get names at creation or automatically |
| Session navigation only in UI |
claude --list in the terminal |
| CLI = open a new chat |
CLI = enter a context |
Notes
- All changes are backwards-compatible:
claude with no arguments keeps working as today
- P1+P2 cover the core pain; P3+P4 are nice-to-have
Environment Info
- Platform: darwin
- Terminal: tmux
- Version: 2.1.76
- Feedback ID: 5126dc9d-a895-4d6f-84f0-b51100275bdb
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/a/.local/share/claude/versions/2.1.76 (expected in multi-process scenarios)\n at FvT (/$bunfs/root/src/entrypoints/cli.js:2417:2026)\n at Lxq (/$bunfs/root/src/entrypoints/cli.js:2417:1170)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-14T09:29:11.001Z"}]
Bug Description
Session Management: CLI Improvements
TL;DR
Allow starting
claudewith a session name or context directly from the command line — no extra clicks, no accumulation of unnamed empty sessions.Problem
Every
claudeinvocation creates a new empty unnamed session. To continue yesterday's work, you have to:That's three extra steps for the most common use case.
Additional issues:
Proposed Changes
P1 — Launch with session name or fuzzy search (high priority)
Behavior:
textmatches an existing session name (exact or fuzzy) → resume itP2 — Resume flags (high priority)
P3 — Auto-naming sessions (medium priority)
If a session has no name after the conversation ends, the CLI suggests one based on the first message — similar to how ChatGPT names chats. Options:
Name this session "nginx setup"? [Y/n]P4 — Session list in CLI (low priority)
Sessions are scoped to a directory, so the default list shows only the current project.
Output of
--list:Output of
--list --all:Expected Benefits
claude -rorclaude "deploy"claude --listin the terminalNotes
claudewith no arguments keeps working as todayEnvironment Info
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/a/.local/share/claude/versions/2.1.76 (expected in multi-process scenarios)\n at FvT (/$bunfs/root/src/entrypoints/cli.js:2417:2026)\n at Lxq (/$bunfs/root/src/entrypoints/cli.js:2417:1170)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-14T09:29:11.001Z"}]