[BUG] Claude Code Powershell attempted to create the first workspace in C:\Windows\System32, not the initial current directory
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?
I installed Claude Code Powershell for the first time today. I started the command from a non-administrator command prompt and set my current directory to a folder on my E drive that I created in advance for Claude to use. When it reached the workspace creation, it asked for permission to create the workspace in C:\Windows\System32. I then aborted the process. Upon exit, the current directory was now C:\Windows\System32. I set the directory back to my desired location on the E drive and started the process again. At that point, it worked as expected.
What Should Happen?
Ideally, this installation process should use the initial current directory as the first location for the initial workspace. It should _never_ attempt to use a protected location as a workspace directory.
Error Messages/Logs
Steps to Reproduce
- Launch Powershell (non-administrator)
- Run: irm https://claude.ai/install.ps1 | iex
- If necessary, add the output path to the system or user path environment variable
- Exit the Powershell window and launch a new Powershell (non-administrator)
- Navigate to a desired workspace folder for Claude Powershell (not a protected location such as C:\Windows\System32)
- Run: Claude
- When the the setup process reaches the workspace creation, it attempts to create the workspace in C:\Windows\System32
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.228 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Accessing workspace:
C:\windows\system32
Quick safety check: Is this a project you created or one you trust? (Like your own code, a well-known open source
project, or work from your team). If not, take a moment to review what's in this folder first.
Claude Code'll be able to read, edit, and execute files here.
Security guide
- Yes, I trust this folder
> 2. No, exit
Enter to confirm · Esc to cancel
PS C:\windows\system32>