Windows Git Bash: process crash (exit code 4294967295) after successful shell snapshot

Resolved 💬 2 comments Opened Apr 10, 2026 by chbpyeon Closed May 22, 2026

Bug Description

Claude Code v2.1.98 on Windows crashes immediately after spawning a shell, even when the shell snapshot succeeds. The process exits with code 4294967295 (0xFFFFFFFF / -1 signed).

Environment

  • OS: Windows 11 Enterprise 10.0.26200
  • Claude Code: v2.1.98 (VS Code extension, anthropic.claude-code-2.1.98-win32-x64)
  • Shell: Git Bash (C:\Program Files\Git\bin\bash.exe)
  • VS Code permission mode: acceptEdits
  • Model: claude-opus-4-6[1m]

Steps to Reproduce

  1. Open VS Code on Windows with Claude Code extension
  2. Open any workspace
  3. Send any prompt that triggers shell usage (e.g., /review)
  4. Process crashes after shell spawn

Debug Log (key sequence)

[DEBUG] Shell snapshot created successfully (4127 bytes)
[DEBUG] Session environment not yet supported on Windows
[DEBUG] Spawning shell without login (-l flag skipped)
[error] Error: Claude Code process exited with code 4294967295

Crash Pattern

| Attempt | Snapshot | Shell Spawn | Outcome |
|---------|----------|-------------|---------|
| 1 (before snapshot fix) | Timeout (SIGTERM) | N/A | Process continued |
| 2 (before snapshot fix) | Timeout (SIGTERM) | N/A | Exit code 4294967295 |
| 3 (after snapshot fix) | Success (4195 bytes) | Attempted | Exit code 4294967295 |
| 4 (after snapshot fix) | Success (4127 bytes) | Attempted | Exit code 4294967295 |
| 5 (retry) | N/A (resume) | N/A | Works normally |

The crash is intermittent — retrying with a new session often succeeds.

Additional Context

Shell snapshot timeout (separate issue, resolved by user)

Git Bash loads ~85 __git_* completion functions via /etc/profile.d/git-prompt.sh. The snapshot script encodes each function individually with base64, taking ~13 seconds on Windows — exceeding the 10-second timeout.

Workaround in ~/.bashrc:

if [[ $- != *i* ]]; then
    eval "$(declare -F | awk '/^declare -f __git/{print "unset -f "$3";"}')" 2>/dev/null
    unset -f ___git_complete profile_d 2>/dev/null
fi

This reduced snapshot time from 13s to ~1.3s. The process crash persists independently.

Other observations

  • Session environment not yet supported on Windows appears before every crash
  • MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found on every session start
  • Crash tested across multiple workspaces with same result

View original on GitHub ↗

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