claude-code - 💡(How to fix) Fix [FEATURE] /delete command to permanently delete current session and reopen session picker [2 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#53342Fetched 2026-04-26 05:18:13
View on GitHub
Comments
2
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
commented ×2labeled ×2closed ×1

Fix Action

Fix / Workaround

The only workaround is to manually find and delete session files under ~/.claude/projects/, then run claude --resume from a separate terminal.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Summary

Add a /delete slash command that permanently deletes the current conversation session and relaunches the session picker (equivalent to claude --resume).

Motivation

Currently, /clear only clears the in-memory context — it does not remove the session file from disk. There is no in-session way to:

  1. Permanently delete a conversation you no longer need
  2. Immediately jump back to the session picker

The only workaround is to manually find and delete session files under ~/.claude/projects/, then run claude --resume from a separate terminal.

Why this is useful

  • Clean session hygiene without leaving the CLI
  • Quick context reset when switching tasks
  • Pairs naturally with claude --resume as a session management workflow

Proposed Solution

Proposed behavior

/delete

  • Prompts for confirmation (e.g. Delete this session permanently? [y/N])
  • On confirmation: deletes the current session file from disk
  • Immediately exits the current session and relaunches the session picker (like claude --resume)

Alternative Solutions

Alternatives considered

  • /clear — only clears context, does not delete the session file
  • External shell script — works but requires leaving the Claude Code session
  • Manual file deletion — not discoverable, breaks the workflow

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

No response

Additional Context

Thx and Good Day

extent analysis

TL;DR

Implement a /delete slash command to permanently delete the current conversation session and relaunch the session picker.

Guidance

  • To implement the /delete command, consider adding a prompt for user confirmation before deleting the session file.
  • The command should delete the current session file from disk and then exit the current session, relaunching the session picker.
  • Review the proposed behavior section for the exact steps the command should perform.
  • Consider integrating this new command with the existing claude --resume functionality for a seamless session management workflow.

Example

No code example is provided as the issue does not contain sufficient technical details about the implementation.

Notes

The implementation details of the /delete command are not specified, so the exact steps to implement this feature are unclear.

Recommendation

Apply workaround: Implement the proposed /delete command as described in the issue, as it provides a clear and useful feature for managing sessions within the CLI.

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 [FEATURE] /delete command to permanently delete current session and reopen session picker [2 comments, 2 participants]