[Feature Request] Preserve session history during Claude Code upgrades
Bug Description
Title:
Auto-preserve session history files during Claude Code upgrade
Problem:
When Claude Code upgrades to a newer version, existing session
JSONL files under C:\Users\<user>\.claude\projects\ may be lost
or become inaccessible if the installer overwrites the user data
directory.
Session files are small (2-5 MB each) but represent significant
investment — long technical investigations with hundreds of
thousands of tokens of context that cannot be cheaply recreated.
Requested behavior:
- Before upgrade: warn user that session data will be preserved
- During upgrade: never delete or overwrite ~/.claude/projects/
- After upgrade: verify all existing sessions are still resumable
- Option in settings: configure custom backup path for sessions
- Bonus: built-in export command
claude --export-session <id> --format markdown
Why:
Storage is cheap (KB per session).
Tokens to recreate context are expensive (time + API cost).
Users should never lose investigation history from an app upgrade.
Platform: Windows / macOS / Linux
Version affected: all
Environment Info
- Platform: win32
- Terminal: windows-terminal
- Version: 2.1.63
- Feedback ID: 3cd6764b-48d0-4d61-9573-55cb2e62f31f
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗