-
Notifications
You must be signed in to change notification settings - Fork 17.8k
[BUG] Claude Desktop Folder Picker Incorrectly Restricts Access to Non-Home Drives on Windows #20550
Description
Preflight Checklist
- I have searched existing issues and this hasn't been reported yet
- This is a single bug report (please file separate reports for different bugs)
- I am using the latest version of Claude Code
What's Wrong?
Bug Description
While analyzing Claude Desktop v1.1.799, I found that the folder selection dialog is intentionally restricted to directories inside the user’s home folder. This prevents selecting folders located on other drives (e.g., E:, D:), even though Claude itself can access those locations after a session starts.
This behavior appears to be caused by the following logic in the app:
// Function that checks whether a folder is inside the home directory
function uF(t, e) {
const r = path.relative(e, t);
return !path.isAbsolute(r) && !r.startsWith("..");
}
// Called from browseFolder
async function E0e(t, e) {
return uF(await fs.realpath(t), await fs.realpath(e));
}
// In browseFolder handler:
const homeDir = os.homedir();
// ... show dialog ...
return await E0e(selectedPath, homeDir) ? selectedPath : (show error dialog)
What This Logic Does
When a folder is selected:
The app calculates path.relative(homeDir, selectedFolder)
If the result is:
An absolute path, or
Starts with ".."
→ The selection is rejected.
Example:
Home directory: C:\Users\NC
Selected folder: E:\shaonv
path.relative("C:\Users\NC", "E:\shaonv") → "E:\shaonv" (absolute path)
→ Rejected
So folders outside the home drive are always blocked.
Why This Is a Problem
This restriction is not technically required, and it creates inconsistent behavior:
Component Drive Access
Claude Desktop folder picker ❌ Home directory only
Claude CLI ✅ Can access all drives
Claude session after start ✅ Can read/write anywhere
So the limitation exists only in the folder picker UI, not in Claude’s actual capabilities.
This makes it impossible to start a project from:
Secondary drives
External drives
Work drives (common in development setups)
Expected Behavior
Users should be able to select any folder they have OS permission to access, not only folders inside the home directory.
At minimum, there should be:
A setting to disable this restriction, or
A confirmation dialog instead of a hard block
Actual Behavior
Selecting any folder outside the home directory results in an error dialog and the folder cannot be used.
Suggested Improvement
Please remove or make optional the “home directory only” validation in the folder picker. This appears to be a UI-level restriction rather than a security necessity, and it conflicts with how Claude CLI and active sessions already work.
What Should Happen?
Users should be able to select any folder they have OS permission to access, not only folders inside the home directory.
At minimum, there should be:
A setting to disable this restriction, or
A confirmation dialog instead of a hard block
Error Messages/Logs
Steps to Reproduce
While analyzing Claude Desktop v1.1.799, I found that the folder selection dialog is intentionally restricted to directories inside the user’s home folder. This prevents selecting folders located on other drives (e.g., E:, D:), even though Claude itself can access those locations after a session starts.
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
1.1.799
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
No response