[BUG] VS Code Extension Fails to Detect Git Bash on Windows + Corrupted Project Path Handling Persists Across Reinstalls

Resolved 💬 3 comments Opened Jan 19, 2026 by marcd35 Closed Jan 22, 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] VS Code Extension Fails to Detect Git Bash on Windows + Corrupted Project Path Handling Persists Across Reinstalls

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

Environment

  • Claude Code Extension Version: 2.1.11
  • Operating System: Windows 10/11
  • VS Code Version: 1.109.0-insider
  • Git Version: 2.x.x (bash version 5.2.37)
  • Terminal: PowerShell / Git Bash

Bug Description

The Claude Code VS Code extension fails to detect Git Bash on Windows despite correct configuration. Additionally, the extension appears to have corrupted project path handling that persists even after complete uninstallation and reinstallation.

Primary Issue: Git Bash Detection Failure

The extension continuously displays:

Error: Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win).
If installed but not in PATH, set environment variable pointing to your bash.exe, similar to:
CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe

Secondary Issue: Corrupted Project Path

The extension is attempting to scan a malformed projects directory path:

'C:\Users\marcc.claude\projects\c--Coding-health-tracker-9000'

This appears to be a corrupted transformation of the actual path C:\Coding\health-tracker-9000, where:

  • Backslashes are being replaced with double dashes (--)
  • The path structure is being mangled
  • This corruption persists across complete uninstalls and reinstalls

Exhaustive Troubleshooting Attempted

All of the following steps were attempted without success:

  1. ✅ Set CLAUDE_CODE_GIT_BASH_PATH environment variable in both User and System variables pointing to C:\Program Files\Git\bin\bash.exe
  2. ✅ Restarted computer multiple times
  3. ✅ Verified Git Bash is installed and functional:

```powershell
PS> bash --version
GNU bash, version 5.2.37(1)-release (x86_64-pc-msys)

PS> git --version
git version 2.x.x.windows.x

PS> $env:CLAUDE_CODE_GIT_BASH_PATH
C:\Program Files\Git\bin\bash.exe
```

  1. ✅ Restarted VS Code and reloaded window multiple times
  2. ✅ Completely reinstalled Git for Windows
  3. ✅ Added Git Bash to system PATH (C:\Program Files\Git\bin)
  4. ✅ Moved project from OneDrive path to simpler path (C:\Coding\health-tracker-9000)
  5. ✅ Deleted the .claude folder and re-authenticated
  6. ✅ Full clean uninstall/reinstall of the Claude Code extension
  7. ✅ Deleted Claude folders from:
  • %APPDATA%\Code\User\globalStorage
  • %USERPROFILE%\.vscode\extensions
  • %USERPROFILE%\.claude

Questions for Maintainers

  1. Where exactly does the extension store project path mappings? (The corruption persists even after deleting all known Claude/VS Code data directories)
  2. Is there a complete list of all files/folders that need to be deleted for a truly clean reinstall?
  3. Is this related to the known regression after version 1.0.126?

Related Issues

  • #13184 - requires git-bash error persists on Windows even when CLAUDE_CODE_GIT_BASH_PATH and symlink are set
  • #13202 - VS Code extension fails to detect git-bash on Windows despite correct configuration
  • #12022 - Claude Code VS Code extension keeps showing "requires git-bash" on Windows
  • #8674 - Claude Code VS Code Extension Fails to Detect Git Bash on Windows Despite Correct Configuration
  • #4507 - Claude Code fails to resolve Git Bash path with space in Windows (Program Files)

What Should Happen?

Expected Behavior

  1. The extension should detect Git Bash based on the CLAUDE_CODE_GIT_BASH_PATH environment variable
  2. Project paths should be handled correctly without corruption
  3. A clean reinstall should clear any corrupted state

Actual Behavior

  1. Git Bash detection fails despite correct configuration
  2. The extension generates malformed project paths with -- replacing path separators
  3. Corrupted path state persists across complete uninstalls, suggesting state is stored in an unexpected location

Error Messages/Logs

## Logs

<details>
<summary>VS Code Output Logs (View → Output → Claude Code)</summary>


2026-01-18 19:51:09.860 [info] Claude code extension is now active?
2026-01-18 19:51:09.860 [info] MCP Server running on port 64920 (localhost only)
2026-01-18 19:51:44.954 [info] AuthManager initialized
2026-01-18 19:51:45.543 [info] Received message from webview: {"type":"request","requestId":"2g3k2dq9mnl","request":{"type":"init"}}
2026-01-18 19:51:45.546 [info] Getting authentication status
2026-01-18 19:51:45.546 [info] No authentication found
2026-01-18 19:51:45.610 [info] Received message from webview: {"type":"request","requestId":"t1g63up8g48","request":{"type":"rename_tab","title":"Claude Code","hasPendingPermissions":false,"hasUnseenCompletion":false}}
2026-01-18 19:51:45.615 [info] Received message from webview: {"type":"request","requestId":"pep6bq8h9y","request":{"type":"get_claude_state"}}
2026-01-18 19:51:45.669 [info] Loading config cache by launching Claude...
2026-01-18 19:51:45.669 [error] Failed to load config cache: Error: Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
2026-01-18 19:51:45.669 [error] Error processing client request: Error: Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
2026-01-18 19:51:45.669 [info] Received message from webview: {"type":"request","requestId":"ht9wknee7cb","request":{"type":"get_current_selection"}}
2026-01-18 19:51:45.670 [info] Received message from webview: {"type":"request","requestId":"h1cbh9mcw6g","request":{"type":"get_asset_uris"}}
2026-01-18 19:51:45.670 [info] Received message from webview: {"type":"request","requestId":"hcv8on8ayu5","request":{"type":"list_sessions_request"}}
2026-01-18 19:51:45.671 [warning] Failed to load sessions from c:\Coding\health-tracker-9000: Error: ENOENT: no such file or directory, scandir 'C:\Users\marcc\.claude\projects\c--Coding-health-tracker-9000'
2026-01-18 19:51:45.671 [info] Received message from webview: {"type":"request","requestId":"kr7vcely4y","request":{"type":"list_sessions_request"}}
2026-01-18 19:51:45.671 [warning] Failed to load sessions from c:\Coding\health-tracker-9000: Error: ENOENT: no such file or directory, scandir 'C:\Users\marcc\.claude\projects\c--Coding-health-tracker-9000'
2026-01-18 19:51:45.671 [info] Received message from webview: {"type":"request","requestId":"3v5ym1w0tfj","request":{"type":"list_sessions_request"}}
2026-01-18 19:51:45.671 [warning] Failed to load sessions from c:\Coding\health-tracker-9000: Error: ENOENT: no such file or directory, scandir 'C:\Users\marcc\.claude\projects\c--Coding-health-tracker-9000'
2026-01-18 19:51:45.671 [info] Received message from webview: {"type":"request","requestId":"tz2x733n7pj","request":{"type":"rename_tab","title":"Claude Code","hasPendingPermissions":false,"hasUnseenCompletion":false}}
2026-01-18 19:51:45.672 [info] Received message from webview: {"type":"request","requestId":"psterthp7j","request":{"type":"rename_tab","title":"Claude Code","hasPendingPermissions":false,"hasUnseenCompletion":false}}
2026-01-18 19:51:45.672 [info] Received message from webview: {"type":"launch_claude","channelId":"v9ks19ep9od","cwd":"c:\\Coding\\health-tracker-9000","model":"default","permissionMode":"default","thinkingLevel":"off"}
2026-01-18 19:51:45.685 [info] Launching Claude on channel: v9ks19ep9od
2026-01-18 19:51:45.687 [info] Received message from webview: {"type":"interrupt_claude","channelId":"pep6bq8h9y"}
2026-01-18 19:51:46.281 [info] Closing Claude on channel: v9ks19ep9od
2026-01-18 19:51:46.281 [error] Error spawning Claude (on channel v9ks19ep9od): Error: Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
2026-01-18 19:51:46.282 [warning] Channel not found: pep6bq8h9y
2026-01-18 19:51:47.614 [info] Received message from webview: {"type":"request","requestId":"u5g86lzfhdc","request":{"type":"login","method":"claudeai"}}
2026-01-18 19:51:47.615 [info] Starting OAuth login flow: method=claudeai
2026-01-18 19:52:15.219 [info] Received message from webview: {"type":"request","requestId":"twqq2s0boj","request":{"type":"submit_oauth_code","code":"[REDACTED]"}}
2026-01-18 19:52:15.220 [info] Handling manual auth code input
2026-01-18 19:52:15.228 [info] Received message from webview: {"type":"request","requestId":"el8j16cupz5","request":{"type":"submit_oauth_code","code":"[REDACTED]"}}
2026-01-18 19:52:15.228 [info] Handling manual auth code input
2026-01-18 19:52:15.532 [error] Failed to fetch subscription: AxiosError: Request failed with status code 401
2026-01-18 19:52:15.534 [info] Saving OAuth tokens to secure storage
2026-01-18 19:52:15.534 [info] Login successful
2026-01-18 19:52:15.534 [info] Getting authentication status
2026-01-18 19:52:15.534 [info] OAuth tokens found in secure storage
2026-01-18 19:52:15.534 [info] Auth status: method=claudeai
2026-01-18 19:52:24.660 [info] AuthManager initialized
2026-01-18 19:52:25.073 [info] Received message from webview: {"type":"request","requestId":"bzm7gjyz9tv","request":{"type":"init"}}
2026-01-18 19:52:25.074 [info] Getting authentication status
2026-01-18 19:52:25.074 [info] OAuth tokens found in secure storage
2026-01-18 19:52:25.074 [info] Auth status: method=claudeai
2026-01-18 19:52:25.142 [info] Received message from webview: {"type":"request","requestId":"9c8wax0tb9k","request":{"type":"rename_tab","title":"Claude Code","hasPendingPermissions":false,"hasUnseenCompletion":false}}
2026-01-18 19:52:25.143 [info] Received message from webview: {"type":"request","requestId":"q8o6zmm0x2e","request":{"type":"get_claude_state"}}
2026-01-18 19:52:25.187 [info] Loading config cache by launching Claude...
2026-01-18 19:52:25.187 [error] Failed to load config cache: Error: Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
2026-01-18 19:52:25.187 [error] Error processing client request: Error: Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
2026-01-18 19:52:25.187 [info] Received message from webview: {"type":"request","requestId":"cul7womxrno","request":{"type":"get_current_selection"}}
2026-01-18 19:52:25.188 [info] Received message from webview: {"type":"request","requestId":"7vcqyccokon","request":{"type":"get_asset_uris"}}
2026-01-18 19:52:25.188 [info] Received message from webview: {"type":"request","requestId":"3iwpeb8rsej","request":{"type":"list_sessions_request"}}
2026-01-18 19:52:25.188 [warning] Failed to load sessions from c:\Coding\health-tracker-9000: Error: ENOENT: no such file or directory, scandir 'C:\Users\marcc\.claude\projects\c--Coding-health-tracker-9000'
2026-01-18 19:52:25.188 [info] Received message from webview: {"type":"request","requestId":"vvqrg5mjuc8","request":{"type":"list_sessions_request"}}
2026-01-18 19:52:25.188 [warning] Failed to load sessions from c:\Coding\health-tracker-9000: Error: ENOENT: no such file or directory, scandir 'C:\Users\marcc\.claude\projects\c--Coding-health-tracker-9000'
2026-01-18 19:52:25.189 [info] Received message from webview: {"type":"request","requestId":"s375y13j09b","request":{"type":"list_sessions_request"}}
2026-01-18 19:52:25.189 [warning] Failed to load sessions from c:\Coding\health-tracker-9000: Error: ENOENT: no such file or directory, scandir 'C:\Users\marcc\.claude\projects\c--Coding-health-tracker-9000'
2026-01-18 19:52:25.189 [info] Received message from webview: {"type":"request","requestId":"xo99ckaccbe","request":{"type":"rename_tab","title":"Claude Code","hasPendingPermissions":false,"hasUnseenCompletion":false}}
2026-01-18 19:52:25.190 [info] Received message from webview: {"type":"request","requestId":"f71tw5u0n27","request":{"type":"rename_tab","title":"Claude Code","hasPendingPermissions":false,"hasUnseenCompletion":false}}
2026-01-18 19:52:25.190 [info] Received message from webview: {"type":"launch_claude","channelId":"5ffu0ccmb7f","cwd":"c:\\Coding\\health-tracker-9000","model":"default","permissionMode":"default","thinkingLevel":"off"}
2026-01-18 19:52:25.194 [info] Launching Claude on channel: 5ffu0ccmb7f
2026-01-18 19:52:25.197 [info] Received message from webview: {"type":"interrupt_claude","channelId":"q8o6zmm0x2e"}
2026-01-18 19:52:25.687 [info] Closing Claude on channel: 5ffu0ccmb7f
2026-01-18 19:52:25.687 [error] Error spawning Claude (on channel 5ffu0ccmb7f): Error: Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
2026-01-18 19:52:25.687 [warning] Channel not found: q8o6zmm0x2e
2026-01-18 19:57:32.510 [info] Received message from webview: {"type":"request","requestId":"yw3xmollqa","request":{"type":"list_sessions_request"}}
2026-01-18 19:57:32.510 [warning] Failed to load sessions from c:\Coding\health-tracker-9000: Error: ENOENT: no such file or directory, scandir 'C:\Users\marcc\.claude\projects\c--Coding-health-tracker-9000'
2026-01-18 19:57:39.225 [info] Received message from webview: {"type":"request","requestId":"tujri9c650f","request":{"type":"open_output_panel"}}


</details>

Steps to Reproduce

  • Open VSCODE-Insiders
  • Install latest Claude Code
  • Authenticate
  • See issue red text
  • See caught error when hovering over Claude Code extension

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.11

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Additional Context

  • The CLI version (claude command) may work from Git Bash terminal, but the VS Code extension integration is completely broken
  • This issue is blocking productive use of Claude Code for development work
  • Happy to provide additional logs or diagnostic information as needed

View original on GitHub ↗

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