claude-code - 💡(How to fix) Fix /clear deletes chat history permanently

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…

Root Cause

I lost multiple days of conversation history in a long-running coding session because /clear wiped the chat without recovery option.

RAW_BUFFERClick to expand / collapse

I lost multiple days of conversation history in a long-running coding session because /clear wiped the chat without recovery option.

What happened

  • I typed /clear because Claude told me that this will clear his session
  • The entire visible chat history was deleted immediately and permanently
  • There is no undo, no recovery, no archive

Why this is a serious problem

  • Claude told me this will clear the session and not the complete chat
  • Long sessions (multi-day) contain decisions, explanations, and context that cannot easily be reconstructed
  • No warning. No "are you sure?". No backup. Just gone.
  • Additionally: the system automatically compresses/summarizes long sessions without any warning — this also causes visible history loss and looks identical to a /clear from the user's perspective

What should happen instead

  • Keep history visible but reset Claude's context separately
  • Auto-archive before clearing
  • Show a clear warning explaining EXACTLY what /clear does (deletes the entire chat, not just Claude's context)
  • Same warning for auto-compression events

This is a destructive, irreversible action that is triggered too easily.

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 /clear deletes chat history permanently