[BUG] Switching folders in UI causes confusing session "loss"
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When using the Claude Code UI to open a new folder, the previous session becomes inaccessible without knowing to press A in the /resume picker. This creates a very frustrating experience where users believe they've lost all their work.
What Should Happen?
- Warning before switching folders: "This will switch to a new session. Your current session will be saved and can be resumed later."
- Clear indication of how to get back to previous sessions
- The
/resumepicker should default to showing recent sessions across all projects, or at minimum clearly indicate that pressingAshows more sessions
Error Messages/Logs
Steps to Reproduce
Bug Report: Switching folders in UI causes confusing session "loss"
Summary
When using the Claude Code UI to open a new folder, the previous session becomes inaccessible without knowing to press A in the /resume picker. This creates a very frustrating experience where users believe they've lost all their work.
Steps to Reproduce
- Start Claude Code in folder A
- Work on a substantial session (hours of context, many interactions)
- Click the folder icon in the UI and select a different folder B
- Try to get back to your previous session
Expected Behavior
- Warning before switching folders: "This will switch to a new session. Your current session will be saved and can be resumed later."
- Clear indication of how to get back to previous sessions
- The
/resumepicker should default to showing recent sessions across all projects, or at minimum clearly indicate that pressingAshows more sessions
Actual Behavior
- Session switches immediately with no warning
- Previous session appears to be "gone"
/resumeonly shows sessions from current directory by default- User must know to press
Ato see "all projects" - this is not discoverable - Quitting and restarting loses folder context
Impact
- Users lose hours of work context
- Very frustrating and trust-breaking experience
- Users may not realize their session still exists in
~/.claude/projects/
Suggested Fixes
- Add confirmation dialog when switching folders: "Switch to [folder]? Your current session will be saved."
- Show recent sessions from all projects in
/resumeby default, or add a "Recent" section at the top - Add visual indicator in the picker showing that
Atoggles project scope - Remember last working directory when restarting Claude Code
- Add "Return to previous session" option after switching folders
Environment
- Claude Code version: 2.0.65
- Platform: macOS Darwin 25.2.0
Additional Context
Session files are preserved in ~/.claude/projects/ but the UI makes them effectively invisible. The workaround (pressing A in the resume picker) is not discoverable through normal usage.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗