[BUG] Bash tool returns exit code 5 on native Windows in Parallels VM

Resolved 💬 4 comments Opened Feb 6, 2026 by jacksimms Closed Feb 6, 2026

Bug Description

The Bash tool consistently returns exit code 5 (Windows ERROR_ACCESS_DENIED) for all commands on native Windows running inside a Parallels Desktop VM. No output is produced and no commands execute. All other tools (Read, Write, Edit, Glob, Grep) work correctly.

Environment

  • OS: Windows (native, not WSL) running inside Parallels Desktop on macOS
  • Claude Code Version: 2.1.33 (also reproduced on 2.1.31)
  • Installation Methods Tested: npm-global and native installer
  • Node.js: Installed and functional
  • Git for Windows: Installed at C:\Program Files\Git\bin\bash.exe
  • PowerShell Execution Policy: RemoteSigned (CurrentUser scope)
  • WSL2: Cannot be installed (nested virtualization not supported in Parallels)

Steps to Reproduce

  1. Set up a Windows VM in Parallels Desktop on macOS
  2. Install Claude Code (npm or native installer)
  3. Install Git for Windows
  4. Set CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
  5. Run Claude Code (VS Code extension or CLI)
  6. Attempt any Bash tool command (e.g., whoami, dir, echo hello)
  7. All commands return exit code 5 with no output

Expected Behavior

Bash commands should execute and return output.

Actual Behavior

All Bash tool commands immediately return exit code 5 with no output, regardless of the command.

Troubleshooting Already Attempted

  • [x] Verified Git Bash exists at expected path (Test-Path returns True)
  • [x] Set CLAUDE_CODE_GIT_BASH_PATH environment variable (both session and persistent User scope)
  • [x] Tried PowerShell as shell
  • [x] Tried cmd.exe as shell
  • [x] Tried dangerouslyDisableSandbox: true on Bash tool calls - same result
  • [x] Verified Node.js child_process.execSync('whoami') works perfectly (returns username)
  • [x] Checked Windows Exploit Protection settings - no policies targeting VS Code, Node.js, or Git
  • [x] Checked Parallels security settings - Isolate Windows from Mac is disabled
  • [x] PowerShell execution policy is RemoteSigned (not Restricted)
  • [x] Upgraded from 2.1.31 to 2.1.33 (both npm and native installer)
  • [x] Fully restarted VS Code multiple times
  • [x] Reproduced in both VS Code extension and CLI
  • [x] Ran claude doctor - all checks passed (Search: OK, auto-updates: enabled)
  • [x] WSL2 installation fails due to no nested virtualization support in Parallels

Key Diagnostic Finding

Node.js child_process.execSync('whoami') executes successfully and returns the correct username. This confirms the OS is NOT blocking child process spawning from Node.js. The issue is specific to how Claude Code's Bash tool spawns processes.

claude doctor Output

Diagnostics
  Currently running: npm-global (2.1.31)
  Path: C:\Program Files\nodejs\node.exe
  Search: OK (vendor)

Updates
  Auto-updates: enabled
  Update permissions: Yes
  Auto-update channel: latest

Additional Context

Exit code 5 is undocumented in Claude Code. On Windows, exit code 5 corresponds to ERROR_ACCESS_DENIED. Since native Windows sandbox support is listed as planned in the official docs, this may be related to the sandbox infrastructure attempting operations that are unsupported or blocked in a Parallels virtualization context.

View original on GitHub ↗

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