Skip to content

Add new-session plugin with /new command#59275

Open
ajaycj wants to merge 1 commit into
anthropics:mainfrom
ajaycj:add-new-session-plugin
Open

Add new-session plugin with /new command#59275
ajaycj wants to merge 1 commit into
anthropics:mainfrom
ajaycj:add-new-session-plugin

Conversation

@ajaycj
Copy link
Copy Markdown

@ajaycj ajaycj commented May 15, 2026

Summary

Adds a new new-session plugin that introduces a /new slash command. It bridges the gap between the built-in /clear and /branch commands:

  • /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 /resume

Optional 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.json
  • plugins/new-session/commands/new.md
  • plugins/new-session/README.md

Files modified:

  • plugins/README.md — added entry to plugins table

Test plan

  • Installed locally by adding the plugin path to .claude/settings.json
  • Verified /new (no args) clears context and old session appears in /resume
  • Verified /new <name> labels the saved session for easier identification
  • Confirmed no session data is deleted — old conversations remain fully resumable

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant