[FEATURE] Add /delete command to delete current session
### Preflight Checklist - [x] I have searched [existing requests](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20label%3Aenhancement) and this feature hasn't been requested yet - [x] This is a single feature request (not multiple features) ### Problem Statement Currently, there is no built-in way to delete sessions from within Claude Code. When users want to remove old, test, or sensitive sessions, they must: 1. Exit Claude Code or open a separate terminal 2. Manually navigate to `~/.claude/projects/` 3. Find the correct `.jsonl` session file 4. Manually delete the file This breaks the workflow and is error-prone — especially for users who frequently create sessions for testing or experimentation and want to keep their session list clean when using `/resume`. The existing `/clear` command only clears conversation history within the current session — it does **not** delete the session itself. There is currently no way to permanently remove a session without leaving Claude Code. ### Proposed Solution Add a `/delete` command with two modes: ### Mode 1: Delete current session ``` /delete ``` Deletes the currently active session, prompts for confirmation, then exits or starts a new session. ``` > /delete Delete current session "portfolio-fixes"? (y/n): y Session deleted. Starting new session... ``` ### Mode 2: Delete session by name ``` /delete <session-name> ``` Deletes a specific session by name, similar to how `/resume <session-name>` works. Show
Posted by rstar327 on Feb 19, 2026, 2:07 PM
Tags
Related issues
- [Meta] Feedback on granular control over Copilot changes
- unexpected status 401 Unauthorized issue
- [MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
- [CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
- Video stops playing after some minutes
- [MODEL] Claude verbose code comments by default — ignores instructions to stop.
Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments
github (Software)
[Meta] Feedback on granular control over Copilot changes
unexpected status 401 Unauthorized issue
[MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
[CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
Video stops playing after some minutes
[MODEL] Claude verbose code comments by default — ignores instructions to stop.
Scope Codex VS Code chats to the current workspace/project
Update on "Co-authored-by: Copilot" in commit messages
[FEATURE] Add /delete command to delete current session
### Preflight Checklist - [x] I have searched [existing requests](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20label%3Aenhancement) and this feature hasn't been requested yet - [x] This is a single feature request (not multiple features) ### Problem Statement Currently, there is no built-in way to delete sessions from within Claude Code. When users want to remove old, test, or sensitive sessions, they must: 1. Exit Claude Code or open a separate terminal 2. Manually navigate to `~/.claude/projects/` 3. Find the correct `.jsonl` session file 4. Manually delete the file This breaks the workflow and is error-prone — especially for users who frequently create sessions for testing or experimentation and want to keep their session list clean when using `/resume`. The existing `/clear` command only clears conversation history within the current session — it does **not** delete the session itself. There is currently no way to permanently remove a session without leaving Claude Code. ### Proposed Solution Add a `/delete` command with two modes: ### Mode 1: Delete current session ``` /delete ``` Deletes the currently active session, prompts for confirmation, then exits or starts a new session. ``` > /delete Delete current session "portfolio-fixes"? (y/n): y Session deleted. Starting new session... ``` ### Mode 2: Delete session by name ``` /delete <session-name> ``` Deletes a specific session by name, similar to how `/resume <session-name>` works. Show
Comments (0)
No comments yet. Start the discussion.