[FEATURE] Named sessions for easier project management and --resume functionality

Resolved 💬 3 comments Opened Sep 16, 2025 by hwnahm Closed Sep 19, 2025

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:

  1. Start a named session: claude --session-name "vault-monitoring"
  2. Work on the project with full Claude Code context
  3. Switch to another project: claude --session-name "bug-fix"
  4. Later resume the original session: claude --resume "vault-monitoring"
  5. List available sessions: claude --list-sessions

Key features:

  • Named session creation with --session-name flag
  • 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 name and tmux 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:

  1. Monday 2 PM: Start monitoring session

claude --session-name "vault-monitoring"
Set up 43-hour performance monitoring scripts and data collection

  1. Monday 4 PM: Urgent bug report comes in

claude --session-name "auth-bug-fix"
Debug authentication issues in separate context

  1. Tuesday 9 AM: Check monitoring progress

claude --resume "vault-monitoring"
Full context preserved: monitoring scripts, data analysis, previous findings

  1. Tuesday 11 AM: Code review requested

claude --session-name "code-review-pr-123"
Review teammate's code with fresh context

  1. Tuesday 2 PM: Continue monitoring analysis

claude --resume "vault-monitoring"
Pick up exactly where I left off, with all previous context intact

  1. 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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗