claude-code - 💡(How to fix) Fix Add slash command for starting a truly new session (not just /clear) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52805Fetched 2026-04-25 06:20:27
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

This is particularly useful when:

  • MCP servers and skills have bloated the session context
  • You've finished one task and want to start a completely unrelated one
  • Context is too high to do meaningful work after /clear

Root Cause

This is particularly useful when:

  • MCP servers and skills have bloated the session context
  • You've finished one task and want to start a completely unrelated one
  • Context is too high to do meaningful work after /clear
RAW_BUFFERClick to expand / collapse

Problem

/clear (and its aliases /reset, /new) clears the conversation messages but stays in the same session. System prompts, tool schemas, MCP configs, and loaded skill definitions all persist and consume context — I've seen 48% context used immediately after /clear in VS Code with a few MCP servers and skills loaded.

There's no way to start a completely fresh 0% context session from within the conversation. In the CLI you can exit and run claude again, but in the VS Code extension the only option is the Command Palette ("Claude Code: New Conversation"), which isn't discoverable.

Proposed solution

Add a built-in slash command (e.g. /new-session) that starts a completely new session — new session ID, fresh context window, 0% usage. The current session would still be available via /resume.

This is distinct from /clear which should continue to work as it does today for when you want to reset the conversation but keep the loaded context.

Context

This is particularly useful when:

  • MCP servers and skills have bloated the session context
  • You've finished one task and want to start a completely unrelated one
  • Context is too high to do meaningful work after /clear

extent analysis

TL;DR

Implement a new slash command, such as /new-session, to start a completely new session with a fresh context window and 0% usage.

Guidance

  • Introduce a new command that creates a new session ID and resets the context usage to 0%, while keeping the current session accessible via /resume.
  • Update the VS Code extension to include the new command in the Command Palette for easier discoverability.
  • Ensure the new command is distinct from /clear, which should continue to reset the conversation while preserving the loaded context.
  • Consider adding a prompt or notification to inform users about the new command and its purpose.

Example

No code snippet is provided as the issue does not include specific implementation details.

Notes

The proposed solution aims to address the issue of high context usage after using the /clear command. However, the implementation details and potential edge cases are not discussed in the issue.

Recommendation

Apply workaround: Implement the proposed /new-session command to provide users with a way to start a completely new session with a fresh context window. This will address the issue of high context usage and provide a more discoverable solution in the VS Code extension.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Add slash command for starting a truly new session (not just /clear) [1 comments, 2 participants]