Skip to content

[FEATURE] /new command to end current session and start a new named session #36117

Description

@AbeHaruhiko

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Summary

Add a /new slash command that ends the current session and immediately
starts a new named session, without requiring the user to exit and
relaunch Claude Code manually.

Motivation

When working on multiple unrelated tasks, it's useful to keep each task
in its own named session for easy retrieval via /resume.

Currently, starting a new named session requires:

  1. Typing exit to leave the current session
  2. Running claude -n "session name" in the terminal

This interrupts the flow, especially when switching tasks frequently.

Related

  • /resume for session management
  • /clear for resetting context within a session

Proposed Solution

Proposed behavior

/new "session name"

  • Saves and closes the current session
  • Immediately starts a new session with the given name
  • If no name is provided, starts an unnamed new session (equivalent
    to current /clear behavior, but as a fresh session)

Alternative Solutions

Current workaround

  • exit + claude -n "name" from the terminal
  • Shell alias: alias cn='claude -n'

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions