Folder Renaming
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?
Title: Cannot rename working directory folder — Claude Code crashes with "Working directory no longer exists"
Issue:
When the folder that Claude Code is opened in is renamed, Claude Code throws a hard crash:
Working directory no longer exists: D:\Google Drive\0.000 Claude Code\Option Scanner by Claude.
The folder may have been moved, deleted, or unmounted.
There is no way to recover the session — it is permanently terminated.
Steps to reproduce:
- Open Claude Code desktop app (Windows 11), working directory:
D:\Google Drive\0.000 Claude Code\Option Scanner by Claude
- Rename the folder in Windows Explorer to a new name (e.g., OptionRadar)
- Claude Code immediately crashes with the error above — session is lost
Expected behavior:
Claude Code should either (a) detect the rename and update its working directory
reference, or (b) prompt the user to point to the new location and resume the session.
Actual behavior:
Hard crash, full session loss. Opening a new claude session in the renamed folder
starts a completely blank session with no prior context.
Environment:
- OS: Windows 11 Home 10.0.26200
- Claude Code: Desktop app
- Working directory: Google Drive synced folder on D:\
Request:
Support folder renames gracefully — either follow the rename (Windows provides rename
notifications via ReadDirectoryChangesW) or offer a session-reconnect dialog instead
of a hard crash.
What Should Happen?
Support folder renames gracefully — either follow the rename (Windows provides rename
notifications via ReadDirectoryChangesW) or offer a session-reconnect dialog instead
of a hard crash.
Error Messages/Logs
Steps to Reproduce
Steps to reproduce:
- Open Claude Code desktop app (Windows 11), working directory:
D:\Google Drive\0.000 Claude Code\Option Scanner by Claude
- Rename the folder in Windows Explorer to a new name (e.g., OptionRadar)
- Claude Code immediately crashes with the error above — session is lost
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.92 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗