[FEATURE] Named sessions for easier project management and --resume functionality
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
Currently, the --resume option only allows resuming the most recent session. When working on multiple projects or long-running tasks simultaneously, it's
difficult to return to a specific session context.
This becomes particularly challenging when:
- Managing multiple projects that require different Claude Code contexts
- Running long-term monitoring or debugging sessions that span days
- Switching between different development tasks throughout the day
- Collaborating with team members who need to resume specific sessions
The lack of session identification makes it impossible to maintain multiple concurrent workflows efficiently, forcing developers to either lose context when
switching tasks or avoid using Claude Code for complex, multi-session projects.
Proposed Solution
Add the ability to name sessions and resume them by name, similar to how tmux or screen handle named terminal sessions.
Ideal user experience:
- Start a named session:
claude --session-name "vault-monitoring" - Work on the project with full Claude Code context
- Switch to another project:
claude --session-name "bug-fix" - Later resume the original session:
claude --resume "vault-monitoring" - List available sessions:
claude --list-sessions
Key features:
- Named session creation with
--session-nameflag - Resume by name with
--resume <name> - Session listing command to see all available sessions
- Automatic session cleanup after configurable periods
- Integration with existing project configuration (CLAUDE.md)
Alternative Solutions
I've tried using multiple terminal windows but this doesn't preserve the conversation context and project state between sessions.
Current workarounds:
- Taking detailed notes in CLAUDE.md about session progress and context
- Manually recreating context when resuming work (time-consuming and error-prone)
- Using separate terminal sessions for different projects (loses Claude Code's conversational benefits)
- Avoiding Claude Code for long-running tasks due to context switching difficulties
Other tools that solve similar problems:
- tmux/screen:
tmux new-session -s nameandtmux attach -t name - VS Code: Workspace-specific settings and state preservation
- Git: Branch-based context switching for different features
- Jupyter: Named notebook kernels for different projects
None of these alternatives provide the conversational AI context that Claude Code offers.
Priority
Low - Nice to have
Feature Category
CLI commands and flags
Use Case Example
Real-world scenario: Managing a DeFi vault monitoring project alongside daily development tasks.
Step-by-step workflow:
- Monday 2 PM: Start monitoring session
claude --session-name "vault-monitoring"
Set up 43-hour performance monitoring scripts and data collection
- Monday 4 PM: Urgent bug report comes in
claude --session-name "auth-bug-fix"
Debug authentication issues in separate context
- Tuesday 9 AM: Check monitoring progress
claude --resume "vault-monitoring"
Full context preserved: monitoring scripts, data analysis, previous findings
- Tuesday 11 AM: Code review requested
claude --session-name "code-review-pr-123"
Review teammate's code with fresh context
- Tuesday 2 PM: Continue monitoring analysis
claude --resume "vault-monitoring"
Pick up exactly where I left off, with all previous context intact
- Wednesday: Team handoff
Colleague runs claude --resume "vault-monitoring"
Full context transfer without manual explanation
Current pain points this solves:
- Lost 2+ hours recreating monitoring context when switching tasks
- Team collaboration required lengthy context explanations
- Avoided using Claude Code for complex tasks due to context switching issues
- Monitoring data analysis was fragmented across multiple disconnected sessions
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗