Add new-session plugin with /new command#59275
Open
ajaycj wants to merge 1 commit into
Open
Conversation
Introduces a /new slash command that bridges /clear and /branch: starts a fresh session while preserving the current one for /resume. Optional argument labels the saved session for easier retrieval.
b7a1e78 to
58cf40d
Compare
This was referenced May 15, 2026
Open
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
new-sessionplugin that introduces a/newslash command. It bridges the gap between the built-in/clearand/branchcommands:/clear— wipes context in the same session/branch— forks the current session, copying full history/new— starts a fresh session while preserving the current one for/resumeOptional argument labels the saved session for easier retrieval (e.g.
/new auth-refactor).Implementation
The plugin is a single markdown command that instructs Claude to invoke the built-in
/clear(with an optional label argument) so the old session remains accessible via/resume. No new code paths or destructive operations.Files added:
plugins/new-session/.claude-plugin/plugin.jsonplugins/new-session/commands/new.mdplugins/new-session/README.mdFiles modified:
plugins/README.md— added entry to plugins tableTest plan
.claude/settings.json/new(no args) clears context and old session appears in/resume/new <name>labels the saved session for easier identification