[BUG] Claude Code Filesystem Provider Fails in MINGW64 Environment

Resolved 💬 7 comments Opened Jul 13, 2025 by GregoryArmstrong Closed Jul 16, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.51
  • Operating System: Windows 10/11 with MINGW64 (Git Bash)
  • Terminal: Powershell

Bug Description

Claude Code's Edit/Write tools fail in MINGW64/Git Bash environments due to path conversion and URL encoding issues in the filesystem provider.

Steps to Reproduce

  1. Open Claude Code in MINGW64/Git Bash environment
  2. Navigate to any directory
  3. Create a test file: echo "test" > test-file.txt
  4. Attempt to use Edit tool on the file
  5. Observe filesystem provider error

Expected Behavior

Edit/Write tools should work correctly in MINGW64 environments with proper path handling.

Actual Behavior

High severity for Windows developers using Git Bash - all Edit/Write operations fail.

Additional Context

Root Cause Analysis

  1. MINGW64 shell reports working directory as /c/Users/Greg/website (Unix-style)
  2. Node.js process sees working directory as C:\Users\Greg\website (Windows-style)
  3. Edit/Write tools convert relative paths to Windows absolute paths
  4. Paths get URL-encoded: c%3A%5CUsers%5CGreg%5Cwebsite%5Cfilename.txt
  5. _claude_fs_right: protocol cannot resolve the malformed URI

Suggested Fix

  • Detect MINGW64 environment and handle path conversion appropriately
  • Ensure filesystem provider can handle both Unix-style and Windows-style paths
  • Prevent URL encoding issues with Windows drive letters in filesystem URIs

View original on GitHub ↗

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