[BUG] Claude Code is completely non-functional on Windows systems where the username contains a period (common in enterprise Active Directory environments)
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?
Bug Report: Claude Code Cannot Run on Windows with Domain Usernames Containing Periods
Issue: Claude Code is completely non-functional on Windows systems where the username contains a period (common in enterprise Active Directory
environments).
Environment
- OS: Windows 11 Enterprise 10.0.26100
- Username: pchacon.APEXCLEARING (domain format: firstname.DOMAIN)
- Claude Code: Latest version (npm installation)
- Git for Windows: 2.x (multiple versions tested)
Problem Description
Claude Code cannot execute any commands after initialization when the Windows username contains a period. This affects all enterprise users with standard
domain account formats.
Reproduction Steps
- Have a Windows domain account with format firstname.DOMAIN
- Install Claude Code via npm install -g @anthropic-ai/claude-code
- Install Git for Windows (any location)
- Set CLAUDE_CODE_GIT_BASH_PATH to bash.exe location
- Run claude and type any prompt
- Result: Claude hangs indefinitely, no response
Root Cause
MSYS2/Cygwin runtime (used by Git Bash) is fundamentally incompatible with Windows usernames containing periods. This is a known MSYS2 limitation.
Error when running bash directly:
C:\Git\bin\bash.exe -c "echo hello"
fatal error - add_item ("\??\C:\Users\pchacon.APEXCLEARING\...", "/", ...) failed, errno 1
Attempted Solutions (All Failed)
- ❌ Installing Git to user AppData (default location)
- ❌ Installing Git to C:\Git (avoiding username in path)
- ❌ Using Portable Git
- ❌ Setting CLAUDE_CODE_GIT_BASH_PATH environment variable
- ❌ All Git for Windows versions exhibit same behavior
Testing Performed
# Test 1: Original Git location
C:\Users\pchacon.APEXCLEARING\AppData\Local\Programs\Git\bin\bash.exe -c "echo hello"
# Result: Fatal error
# Test 2: Git installed to C:\
C:\Git\bin\bash.exe -c "echo hello"
# Result: Hangs indefinitely
# Test 3: Claude Code with both paths
setx CLAUDE_CODE_GIT_BASH_PATH "C:\Git\bin\bash.exe"
claude
> "any prompt"
# Result: Hangs indefinitely
Impact
This affects all enterprise Windows users whose companies use the standard Active Directory naming convention firstname.lastname or firstname.DOMAIN. This
is an extremely common format in corporate environments.
Suggested Fixes
- Add PowerShell native support - Allow Claude Code to use PowerShell Core instead of bash on Windows
- WSL auto-detection - If bash fails, automatically attempt to use WSL if available
- Document this limitation - Add clear warning in Windows installation docs about domain username incompatibility
- Provide alternative shell option - Allow configuration of alternative shells (cmd, powershell, pwsh)
Current Workaround
Only working solution is to install and use WSL:
wsl --install
# Then run Claude Code from within WSL
Additional Context
- This is not a Claude Code bug per se, but a compatibility issue with a critical dependency (Git Bash/MSYS2)
- Affects enterprise adoption as domain accounts are mandatory in most corporations
- WSL may not be available in all corporate environments due to security policies
Request
Please consider adding native PowerShell support or an alternative shell option for Windows to avoid the Git Bash/MSYS2 dependency entirely.
What Should Happen?
Suggested Fixes
- Add PowerShell native support - Allow Claude Code to use PowerShell Core instead of bash on Windows
- WSL auto-detection - If bash fails, automatically attempt to use WSL if available
- Document this limitation - Add clear warning in Windows installation docs about domain username incompatibility
- Provide alternative shell option - Allow configuration of alternative shells (cmd, powershell, pwsh)
Error Messages/Logs
Steps to Reproduce
- Prerequisites:
- Windows 10/11 Enterprise with Active Directory domain account
- Username format: firstname.DOMAIN or firstname.lastname (contains period)
- Example: pchacon.APEXCLEARING
- Install Claude Code:
npm install -g @anthropic-ai/claude-code
- Install Git for Windows:
- Download from https://git-scm.com/downloads/win
- Install to any location (default or custom path)
- Set Git Bash path environment variable:
setx CLAUDE_CODE_GIT_BASH_PATH "C:\Program Files\Git\bin\bash.exe"
- (Adjust path based on your Git installation location)
- Open new PowerShell/terminal window (to load environment variable)
- Run Claude Code:
claude
- Type any prompt and press Enter:
What is 2+2?
Expected Result: Claude responds to the prompt
Actual Result: Claude hangs indefinitely with no response
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.42
Platform
Google Vertex AI
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗