MSYS2 fork failure (0xC0000142) makes all tools unusable even with Git in correct location

Resolved 💬 5 comments Opened Feb 8, 2026 by gilbert-mjp Closed Mar 25, 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?

## Environment

  • Claude Code version: 2.1.34 (winget install)
  • OS: Windows 10 (MSYS_NT-10.0-28020)
  • Git: C:\Program Files\Git (correct location)
  • Shell: PowerShell (launched from PowerShell, not Git Bash)

## Problem

All tool calls (Bash, Read, Write, Edit) fail with:

Command failed: cygpath -u 'C:\Temp'

Debug log shows the real error is MSYS2 fork failure:

0 [main] bash 730 dofork: child -1 - forked process 8184 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
0 [main] bash 580 child_copy: dll data read copy failed, 0x13B6000..0x13CFC90, done 0, windows pid 11572, Win32 error 299

Git IS installed at C:\Program Files\Git — this is NOT the hardcoded path issue from #9182 or #7528. cygpath.exe exists and is findable, but MSYS2 cannot fork because the Bun-compiled claude.exe process is
too large for MSYS2's fork() emulation to copy.

## Impact

  • Glob and Grep work (native ripgrep, no fork needed)
  • Bash, Read, Write, Edit ALL broken
  • Claude Code is essentially unusable on Windows

## Suggested Fix
Replace the execSync("cygpath -u ...") call with pure JavaScript path conversion (e.g. path.replace(/\\/g, '/').replace(/^([A-Z]):/, (_, d) => '/' + d.toLowerCase())). No need to spawn a subprocess just
to convert a path.

## Related

  • #9182 (hardcoded cygpath path)
  • #7528
  • #12911

What Should Happen?

## Environment

  • Claude Code version: 2.1.34 (winget install)
  • OS: Windows 10 (MSYS_NT-10.0-28020)
  • Git: C:\Program Files\Git (correct location)
  • Shell: PowerShell (launched from PowerShell, not Git Bash)

## Problem

All tool calls (Bash, Read, Write, Edit) fail with:

Command failed: cygpath -u 'C:\Temp'

Debug log shows the real error is MSYS2 fork failure:

0 [main] bash 730 dofork: child -1 - forked process 8184 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
0 [main] bash 580 child_copy: dll data read copy failed, 0x13B6000..0x13CFC90, done 0, windows pid 11572, Win32 error 299

Git IS installed at C:\Program Files\Git — this is NOT the hardcoded path issue from #9182 or #7528. cygpath.exe exists and is findable, but MSYS2 cannot fork because the Bun-compiled claude.exe process is
too large for MSYS2's fork() emulation to copy.

## Impact

  • Glob and Grep work (native ripgrep, no fork needed)
  • Bash, Read, Write, Edit ALL broken
  • Claude Code is essentially unusable on Windows

## Suggested Fix
Replace the execSync("cygpath -u ...") call with pure JavaScript path conversion (e.g. path.replace(/\\/g, '/').replace(/^([A-Z]):/, (_, d) => '/' + d.toLowerCase())). No need to spawn a subprocess just
to convert a path.

## Related

  • #9182 (hardcoded cygpath path)
  • #7528
  • #12911

Error Messages/Logs

Steps to Reproduce

## Environment

  • Claude Code version: 2.1.34 (winget install)
  • OS: Windows 10 (MSYS_NT-10.0-28020)
  • Git: C:\Program Files\Git (correct location)
  • Shell: PowerShell (launched from PowerShell, not Git Bash)

## Problem

All tool calls (Bash, Read, Write, Edit) fail with:

Command failed: cygpath -u 'C:\Temp'

Debug log shows the real error is MSYS2 fork failure:

0 [main] bash 730 dofork: child -1 - forked process 8184 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
0 [main] bash 580 child_copy: dll data read copy failed, 0x13B6000..0x13CFC90, done 0, windows pid 11572, Win32 error 299

Git IS installed at C:\Program Files\Git — this is NOT the hardcoded path issue from #9182 or #7528. cygpath.exe exists and is findable, but MSYS2 cannot fork because the Bun-compiled claude.exe process is
too large for MSYS2's fork() emulation to copy.

## Impact

  • Glob and Grep work (native ripgrep, no fork needed)
  • Bash, Read, Write, Edit ALL broken
  • Claude Code is essentially unusable on Windows

## Suggested Fix
Replace the execSync("cygpath -u ...") call with pure JavaScript path conversion (e.g. path.replace(/\\/g, '/').replace(/^([A-Z]):/, (_, d) => '/' + d.toLowerCase())). No need to spawn a subprocess just
to convert a path.

## Related

  • #9182 (hardcoded cygpath path)
  • #7528
  • #12911

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

latest

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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