[BUG] Claude Code is completely non-functional on Windows systems where the username contains a period (common in enterprise Active Directory environments)

Resolved 💬 6 comments Opened Feb 13, 2026 by pchacon10 Closed Apr 14, 2026

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

  1. Have a Windows domain account with format firstname.DOMAIN
  2. Install Claude Code via npm install -g @anthropic-ai/claude-code
  3. Install Git for Windows (any location)
  4. Set CLAUDE_CODE_GIT_BASH_PATH to bash.exe location
  5. Run claude and type any prompt
  6. 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)

  1. ❌ Installing Git to user AppData (default location)
  2. ❌ Installing Git to C:\Git (avoiding username in path)
  3. ❌ Using Portable Git
  4. ❌ Setting CLAUDE_CODE_GIT_BASH_PATH environment variable
  5. ❌ 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

  1. Add PowerShell native support - Allow Claude Code to use PowerShell Core instead of bash on Windows
  2. WSL auto-detection - If bash fails, automatically attempt to use WSL if available
  3. Document this limitation - Add clear warning in Windows installation docs about domain username incompatibility
  4. 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

  1. Add PowerShell native support - Allow Claude Code to use PowerShell Core instead of bash on Windows
  2. WSL auto-detection - If bash fails, automatically attempt to use WSL if available
  3. Document this limitation - Add clear warning in Windows installation docs about domain username incompatibility
  4. Provide alternative shell option - Allow configuration of alternative shells (cmd, powershell, pwsh)

Error Messages/Logs

Steps to Reproduce

  1. Prerequisites:
  • Windows 10/11 Enterprise with Active Directory domain account
  • Username format: firstname.DOMAIN or firstname.lastname (contains period)
  • Example: pchacon.APEXCLEARING
  1. Install Claude Code:

npm install -g @anthropic-ai/claude-code

  1. Install Git for Windows:
  1. Set Git Bash path environment variable:

setx CLAUDE_CODE_GIT_BASH_PATH "C:\Program Files\Git\bin\bash.exe"

  1. (Adjust path based on your Git installation location)
  2. Open new PowerShell/terminal window (to load environment variable)
  3. Run Claude Code:

claude

  1. 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_

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗