Segmentation fault crash on Windows 11 in VS Code extension v2.0.29+ (Bun v1.3.1 runtime crash)
Environment:
- OS: Windows 11 Enterprise (Build 26100 / x64)
- VS Code Version: 1.105.1
- Claude Code Extension Versions Affected: v2.0.29 through v2.0.35 (latest)
- Last Working Version: v2.0.28
- Shell: Git Bash (C:\AppInstall\scoop\apps\git\current\bin\bash.exe)
Description:
The Claude Code VS Code extension crashes immediately upon opening the extension window to start a new conversation. The crash is 100% reproducible and occurs in all versions after v2.0.28.
Error Message:
panic(main thread): Segmentation fault at address 0x113
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Exit Code: 3 (SIGQUIT/Abort)
Bun Version: v1.3.1 (89fa0f34) bundled with extension
Full Stack Trace:
2025-11-07 12:06:52.563 [info] From claude: ============================================================
Bun v1.3.1 (89fa0f34) Windows x64 (baseline)
Windows v.win11_dt
CPU: sse42 avx avx2
Args: "c:\AppInstall\scoop\apps\vscode\1.105.1\data\extensions\anthropic.claude-code-2.0.35-win32-x64\resources\native-binary\claude.exe" "--output-format" "stream-json" "--verbose" "--input-format" "stream-json" "--append-system-prompt"...
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(6) jsc spawn(11) standalone_executable
Elapsed: 2288ms | User: 750ms | Sys: 796ms
RSS: 0.47GB | Peak: 0.47GB | Commit: 0.46GB | Faults: 123306 | Machine: 33.91GB
panic(main thread): Segmentation fault at address 0x113
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
https://bun.report/1.3.1/e_189fa0f3Az/7v//BCWctiuser.dllg4ngBCWctiuser.dllog9fCYKERNEL32.DLLsu+JCcKERNELBASE.dllov+lBCcKERNELBASE.dllsuglBCYKERNEL32.DLLotjPCWctiuser.dllu/ueow8q0BunxoDm5slkB2/y9jB__0s521CA2AmR
panic: Segmentation fault at address 0x113
panicked during a panic. Aborting.
Claude Code process exited with code 3
When It Crashes:
Based on VS Code Output logs, the crash occurs during:
- Shell snapshot creation (\
[DEBUG] Creating shell snapshot for bash\) - Configuration file writes (atomic write operations to \
.claude.json\) - Initialization phase before first user interaction
Relevant Log Excerpts:
[DEBUG] Creating shell snapshot for bash (C:\AppInstall\scoop\apps\git\current\bin\bash.exe)
[DEBUG] Looking for shell config file: C:\Users\mark.campbell3\.bashrc
[DEBUG] Shell config file not found: C:\Users\mark.campbell3\.bashrc, creating snapshot with Claude Code defaults only
[DEBUG] Snapshots directory: C:\Users\mark.campbell3\.claude\shell-snapshots
Steps to Reproduce:
- Install Claude Code VS Code extension v2.0.29 or later on Windows 11
- Open VS Code
- Click the Claude Code extension icon to open the chat panel
- Extension crashes immediately with segmentation fault
Workaround:
Manually install v2.0.28 which works perfectly:
- Download v2.0.28 VSIX from VS Code marketplace
- Install using "Install from VSIX" in VS Code
- Disable auto-updates for the extension
Attempts to Resolve:
- ✅ Uninstalled potentially conflicting extensions (GitHub Copilot)
- ✅ Verified file permissions on \
C:\Users\mark.campbell3\.claude.json\ - ✅ Checked for antivirus interference
- ✅ Tested across multiple versions (v2.0.29 through v2.0.35) - all fail
- ✅ Confirmed v2.0.28 works reliably
Analysis:
This appears to be a Bun runtime regression introduced in v2.0.29. The segfault at address \0x113\ is a low-level memory access violation occurring during the initialization phase, specifically around shell snapshot creation and file I/O operations on Windows.
Impact:
The extension is completely unusable for Windows 11 users on all versions after v2.0.28.
Additional Context:
- No custom MCP servers configured
- No plugins enabled
- Standard Windows 11 Enterprise installation
- Git for Windows installed via Scoop package manager
13 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Comparison: Working v2.0.28 vs Crashing v2.0.34
I compared the console output from v2.0.28 (working) with v2.0.34 (crashing) and found the likely crash location.
Working v2.0.28 Initialization Sequence
v2.0.34 Crash Point
In v2.0.34, the process:
Root Cause Hypothesis
The crash occurs during permission loading/application phase, specifically after discovering settings files but before successfully applying permissions. This suggests:
The fact that v2.0.28 successfully logs "Adding 110 allow rule(s)" but v2.0.34 never reaches this point strongly indicates the crash happens during permission system initialization.
Settings Files at Time of v2.0.28 Success
Both files existed and were being watched:
C:\Users\mark.campbell3\.claude\settings.json(user settings)c:\AppInstall\dev\.claude\settings.local.json(project local settings)No corruption or missing file errors in v2.0.28 logs.
Root Cause Identified: Bun v1.3.1 Segmentation Fault on Windows
After extensive testing and log analysis, I've identified the actual root cause of the v2.0.35 crash on Windows.
The Problem
v2.0.35 crashes due to a Bun runtime segmentation fault, NOT a configuration or file size issue.
Evidence
v2.0.28 (Working) - Uses Node.js:
v2.0.35 (Crashing) - Uses Bun standalone executable:
Crash Details
From the console output:
Crash Timing
The segfault occurs after successful initialization:
System Information
Workaround
Downgrading to v2.0.28 resolves the issue - it uses Node.js instead of Bun.
Recommendation for Claude Code Team
Related Issues
This may be related to:
Note: Initially suspected file size issues with
.claude.json, but cleaning the file (62KB → 6KB) did not resolve the crash. The Bun segfault is the definitive root cause.I'm experiencing the same Bun v1.3.1 segmentation fault crash, but in the standalone CLI (not the VS Code extension).
Environment:
irm https://claude.ai/install.ps1 | iex)Error Details:
Reproduction:
The crash occurred in a minimal project folder containing only a few
.mdand Excel files. I simply ran/initand it immediately crashed.Bun crash report:
https://bun.report/1.3.1/e_189fa0f3Az/7v//Bgmum0B6vsm0Byns7IomjoG29losBq7qwFmybwnLou/y3DCYKERNEL32.DLLut0LCSntdll.dll4zijBA2DD
Additional Context:
The Bun team indicated v1.3.2 might fix this issue. However, unlike the VS Code extension which can fall back to a Node.js version, the standalone CLI doesn't have a downgrade option available.
@JulesBrookfield for now I recommend using
npm install -g @anthropic-ai/claude-codeand using the npm version until we (Bun) can get this resolved. We fixed some things in Bun v1.3.2 but I cannot gurantee we fixed it until we've reproduced this issue in an earlier version of Bun.I'm experiencing this issue in Vscode since v2.0.30. I am having to keep v2.0.29 extension installed just to use claude in vscode. Any other version including the latest v2.0.45 still has this problem. Should the extension fallback to npm if the native version fails?
2025-11-18 15:00:56.470 [info] From claude: ============================================================
Bun v1.3.2 (b131639c) Windows x64 (baseline)
Windows v.win11_ge
CPU: sse42 avx avx2 avx512
Args: "c:\Users\radjkw\.vscode\extensions\anthropic.claude-code-2.0.45-win32-x64\resources\native-binary\claude.exe" "--output-format" "stream-json" "--verbose" "--input-format" "stream-json" "--append-system-prompt" "\n# VSCo"...
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(3) jsc spawn(12) standalone_executable
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:domain" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:path/win32" "node:perf_hooks" "node:process" "node:querystring" "node:stream" "node:string_decoder" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:zlib" "node:worker_threads" "undici" "ws" "node-fetch" "node:inspector" "node:http2" "node:diagnostics_channel"
Elapsed: 2025ms | User: 390ms | Sys: 250ms
RSS: 0.46GB | Peak: 0.46GB | Commit: 0.45GB | Faults: 117536 | Machine: 0.14TB
panic(main thread): Segmentation fault at address 0x113
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
https://bun.report/1.3.2/e_1b131639Az/7v//BCWctiuser.dllgyngBCWctiuser.dllo68fCYKERNEL32.DLLqwoCCcKERNELBASE.dllsjkSCcKERNELBASE.dllsj7fCYKERNEL32.DLLohxFCWctiuser.dllu3ueo6i00Bu34oDk/vqkB231ikB__0s8/1CA2AmR
panic: Segmentation fault at address 0x113
panicked during a panic. Aborting.
Same issue still occurring through v2.0.75 / bun 1.3.5 / VS Code v1.107.1 (updated 12/20/2025).
Same issue here. Confirming this issue on Claude Code 2.0.75
Environment
Error
Tested Scenarios (all crash at 100% reproduction rate)
C:\Users\<user>) - no MCP, no skills, no projectCrash Report URL
Downgrading to v2.0.55 fixed the issue.
For anyone who might have the same issue, I needed to uninstall Claude from VS Code and uninstall the native build as well.
To uninstall the native build:
Then reinstall via with the specific version number:
& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 2.0.75Bun v1.3.5 (1e86cebd) Windows x64 (baseline)
Windows v.win11_dt
CPU: sse42 avx avx2
Args: "C:\Users\JR\.local\bin\claude.exe"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) abort_signal(24) fetch(3762) jsc spawn(1967) standalone_executable process_dlopen
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:domain" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:path/win32" "node:perf_hooks" "node:process" "node:querystring" "node:stream" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:zlib" "node:worker_threads" "undici" "ws" "node-fetch" "node:inspector" "node:http2" "node:diagnostics_channel"
Elapsed: 3185029ms | User: 200062ms | Sys: 58750ms
RSS: 0.69GB | Peak: 1.26GB | Commit: 0.96GB | Faults: 6961622 | Machine: 34.16GB
panic(main thread): Segmentation fault at address 0xFFFFFFFFFFFFFFFF
oh no: Bun has crashed. This indicates a bug in Bun, not your code. ===========> I'm running a Claude code in terminal.
For those keep having issue, I simiply switch to use Claude CLI installed by Node.js and use the settings in vscode: claudeCode.claudeProcessWrapper to call Claude.
Below is the solution solved by antigravity. ==>
We create a small C wrapper that provides a standard Windows .exe. This .exe simply forwards all command-line arguments to the actual claude.cmd.
C Source (
claude_wrapper.c
):
#include <windows.h>
#include <stdio.h>
int wmain(int argc, wchar_t *argv[]) {
// Build the command line: cmd /c claude.cmd followed by arguments
wchar_t commandLine[32768] = L"cmd /c claude.cmd";
// Get full command line to preserve quoting for arguments
LPWSTR fullCmd = GetCommandLineW();
// Skip the wrapper's own path in the command line string
int inQuotes = 0;
LPWSTR args = fullCmd;
while (*args) {
if (*args == L'\"') inQuotes = !inQuotes;
else if (*args == L' ' && !inQuotes) break;
args++;
}
while (*args == L' ') args++;
if (*args) {
wcscat(commandLine, L" ");
wcscat(commandLine, args);
}
STARTUPINFOW si = { sizeof(si) };
PROCESS_INFORMATION pi;
if (!CreateProcessW(NULL, commandLine, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi)) {
printf("Failed to launch claude.cmd (%lu)\n", GetLastError());
return 1;
}
WaitForSingleObject(pi.hProcess, INFINITE);
DWORD exitCode;
GetExitCodeProcess(pi.hProcess, &exitCode);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
return (int)exitCode;
}
-------------------------------------
Compile and Install:
Save the code above to a file.
------------------------------------------------
Compile it using GCC (MinGW):
gcc -o %APPDATA%\npm\claude.exe claude_wrapper.c -municode -mconsole
(Ensure the output path matches your global npm directory)
--------------------------------------
Update your VS Code
settings.json
to explicitly point to the new wrapper:
{
"claudeCode.claudeProcessWrapper": "C:\\Users\\<YourUser>\\AppData\\Roaming\\npm\\claude.exe"
}
@cgzb that's brilliant!! I'm so glad you thought of that.
I ended up rewriting the wrapper and posting it here https://github.com/Gronsten/claude-wrapper
thanks again!
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.