[FEATURE] /new slash command to switch to a fresh session while preserving the current one

Status Closed — not planned
Maintainer reply None cached
Activity 9 comments · opened Feb 4, 2026 · closed Mar 13, 2026

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

Starting a new session requires exiting (/exit) and re-running claude — a minor but frequent friction. /clear clears history but doesn't create a new session, so you can't
return to the previous context via /resume. There's no way to quickly switch to a fresh session while keeping the current one alive.

Proposed Solution

Add a /new command that preserves the current session (keeps it resumable), opens a fresh new session in-place, and allows users to /resume back to the previous session
later.

Alternative Solutions

Current workaround: /exit, then run claude, then claude --resume to return. This works but adds unnecessary friction when context-switching frequently.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

  1. I'm deep in a debugging session with significant context built up
  2. I need to quickly look something up or work on a different feature
  3. With /new, I switch to a fresh session, do the quick task
  4. Then /resume back to my debugging session with all context intact
  5. Similar to opening a new browser tab while keeping the old one

Additional Context

_No response_

View original on GitHub ↗

9 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/21646
  2. https://github.com/anthropics/claude-code/issues/17120
  3. https://github.com/anthropics/claude-code/issues/12941

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

tomouchi · 6 months ago

This is not a duplicate of the suggested issues:

  • #21646 is about a keyboard shortcut to submit a prompt in a fresh context (/clear + submit as one action)
  • #17120 is about /restart to refresh the environment (reload plugins/hooks) without exiting
  • #12941 is about /clone to fork/duplicate a conversation to try different approaches from the same point

My request is specifically about switching to a brand-new session while preserving the current one, so you can /resume back to it later. The key difference is session persistence — none of the above issues address the ability to leave a session intact, start fresh, and return later. It's analogous to opening a new browser tab while keeping the old one.

RickMeijer · 6 months ago

I found this while making the very same feature request.

Here's an idea though, you could try to wrap claude in a script that restarts on a specific exit code:

  # ~/bin/claude-tabs (make executable)
  #!/bin/bash
  while true; do
      claude "$@"
      exit_code=$?
      [[ $exit_code -eq 42 ]] || break  # Exit code 42 = restart
  done

Then a /new skill could do: exit 42

Not tested it, but Claude came up with this.

tomouchi · 6 months ago

Thanks @RickMeijer, that's a creative workaround idea!

Also, a small note on my previous comment: the "browser tab" analogy would work too, but even just being able to switch sessions within the same instance would be sufficient for my use case.

netopsengineer · 6 months ago

Also would like this feature, I try to keep my context windows in check and therefore my number of sessions is higher with discrete implementation in each. Having to exit and come back in is an odd behavior to try to remember each time.

tomouchi · 6 months ago

Additionally, it would be great if /new could optionally accept a session name, like /new <session-name>.

This would make it easier to identify and resume specific sessions later. Currently, sessions get auto-generated names, which makes it hard to find the right one when using /resume.

Example:

/new bugfix-auth       # starts a new session named "bugfix-auth"
/new                   # starts a new session with auto-generated name (current behavior)
github-actions[bot] · 5 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

saurav-agarwalla · 5 months ago

I would love this feature. I find myself using /new very frequently but then the session's history gets wiped out and I can't come back to it via /resume.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.