Segmentation fault crash on Windows 11 in VS Code extension v2.0.29+ (Bun v1.3.1 runtime crash)

Status Fixed / completed
Maintainer reply None cached
Activity 13 comments · opened Nov 7, 2025 · closed Jan 16, 2026

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:

  1. Shell snapshot creation (\[DEBUG] Creating shell snapshot for bash\)
  2. Configuration file writes (atomic write operations to \.claude.json\)
  3. 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:

  1. Install Claude Code VS Code extension v2.0.29 or later on Windows 11
  2. Open VS Code
  3. Click the Claude Code extension icon to open the chat panel
  4. Extension crashes immediately with segmentation fault

Workaround:
Manually install v2.0.28 which works perfectly:

  1. Download v2.0.28 VSIX from VS Code marketplace
  2. Install using "Install from VSIX" in VS Code
  3. 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

View original on GitHub ↗

13 Comments

github-actions[bot] · 9 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/6591
  2. https://github.com/anthropics/claude-code/issues/10021
  3. https://github.com/anthropics/claude-code/issues/11076

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

Gronsten · 9 months ago

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

[DEBUG] Watching for changes in setting files C:\Users\mark.campbell3\.claude\settings.json, c:\AppInstall\dev\.claude\settings.local.json...
[DEBUG] Using bash path: "C:\AppInstall\scoop\apps\git\current\bin\bash.exe"
[DEBUG] Applying permission update: Adding 110 allow rule(s) to destination 'localSettings': [...]
[DEBUG] Found 0 plugins (0 enabled, 0 disabled)
[DEBUG] Loading skills from directories: managed=..., user=..., project=...
[DEBUG] Creating shell snapshot for bash (...)
[DEBUG] Shell snapshot created successfully (370 bytes)
[DEBUG] Stream started - received first chunk

v2.0.34 Crash Point

In v2.0.34, the process:

  1. ✅ Finds and logs settings file paths
  2. ✅ Resolves bash path
  3. CRASHES - Never logs "Applying permission update: Adding 110 allow rule(s)"
  4. ❌ Never reaches plugin/skills/hooks loading
  5. ❌ Never creates shell snapshot
  6. ❌ Never starts stream

Root Cause Hypothesis

The crash occurs during permission loading/application phase, specifically after discovering settings files but before successfully applying permissions. This suggests:

  • A breaking change in how v2.0.34 parses or applies permission rules
  • Possible regression in settings file parsing
  • Could be specific to certain permission rule formats

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.

Gronsten · 9 months ago

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:

node c:\...\cli.js

v2.0.35 (Crashing) - Uses Bun standalone executable:

c:\...\claude.exe (Bun v1.3.1)
panic(main thread): Segmentation fault at address 0x113

Crash Details

From the console output:

============================================================
Bun v1.3.1 (89fa0f34) Windows x64 (baseline)
Windows v.win11_dt
CPU: sse42 avx avx2
Elapsed: 2103ms | User: 578ms | Sys: 562ms
RSS: 0.46GB | Peak: 0.46GB | Commit: 0.45GB | Faults: 116313

panic(main thread): Segmentation fault at address 0x113

oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Bun crash report: https://bun.report/1.3.1/e_189fa0f3Az/7v//BCWctiuser.dllg4ngBCWctiuser.dllog9fCYKERNEL32.DLLsu+JCcKERNELBASE.dllov+lBCcKERNELBASE.dllsuglBICYKERNEL32.DLLotjPCWctiuser.dllu/ueow8q0BunxoDm5slkB2/y9jB__0s521CA2AmR

Claude Code process exited with code 3

Crash Timing

The segfault occurs after successful initialization:

  • ✅ Settings files loaded
  • ✅ Permissions applied (112 rules)
  • ✅ Plugins/skills loaded
  • ✅ LSP manager initialized
  • ✅ Shell snapshot creation started
  • Crash during shell snapshot execution

System Information

  • OS: Windows 11 Enterprise (build 26100)
  • VS Code: 1.105.1
  • Extension: v2.0.35-win32-x64
  • CPU: x64 with sse42, avx, avx2 support

Workaround

Downgrading to v2.0.28 resolves the issue - it uses Node.js instead of Bun.

Recommendation for Claude Code Team

  1. Immediate: Consider reverting to Node.js runtime for Windows builds
  2. Short-term: Update to a newer Bun version that fixes this segfault
  3. Long-term: Add error handling for runtime crashes with fallback mechanisms

Related Issues

This may be related to:

  • #11202 (macOS v2.0.35 crash - different cause but similar symptoms)
  • Known Bun Windows stability issues with certain system configurations

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.

JulesBrookfield · 9 months ago

I'm experiencing the same Bun v1.3.1 segmentation fault crash, but in the standalone CLI (not the VS Code extension).

Environment:

  • Platform: Windows 11
  • Installation method: PowerShell installer (irm https://claude.ai/install.ps1 | iex)
  • Using latest version of Claude Code standalone CLI

Error Details:

panic(main thread): Segmentation fault at address 0xFFFFFFFFFFFFFFFF

Reproduction:
The crash occurred in a minimal project folder containing only a few .md and Excel files. I simply ran /init and 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.

Jarred-Sumner · 9 months ago

@JulesBrookfield for now I recommend using npm install -g @anthropic-ai/claude-code and 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.

RadJKW · 9 months ago

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.

Gronsten · 9 months ago

Same issue still occurring through v2.0.75 / bun 1.3.5 / VS Code v1.107.1 (updated 12/20/2025).

kimbyungeun · 8 months ago

Same issue here. Confirming this issue on Claude Code 2.0.75

Environment

  • Claude Code: 2.0.75
  • OS: Windows 11
  • VS Code: Insiders (also tested on regular VS Code - same result)
  • Bun: 1.3.5 (bundled)

Error

panic(thread): integer does not fit in destination type
RSS: 3.02-3.05GB (consistent across all attempts)
Exit code: 3

Tested Scenarios (all crash at 100% reproduction rate)

  1. ✗ Large project with MCP servers (aspire, aspire-dashboard, playwright) and 35 skills
  2. ✗ Same project with MCP servers removed (only github MCP remaining)
  3. ✗ Empty home directory (C:\Users\<user>) - no MCP, no skills, no project

Crash Report URL

Downgrading to v2.0.55 fixed the issue.

atselevich · 7 months ago

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:

Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
Remove-Item -Path "$env:LOCALAPPDATA\claude" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force

Then reinstall via with the specific version number:
& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 2.0.75

seoninja13 · 7 months ago

Bun 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.

cgzb · 7 months ago

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. ==>

  1. Create a Native Wrapper

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)

--------------------------------------

  1. Configure VS Code Settings

Update your VS Code
settings.json
to explicitly point to the new wrapper:

{
"claudeCode.claudeProcessWrapper": "C:\\Users\\<YourUser>\\AppData\\Roaming\\npm\\claude.exe"
}

Gronsten · 7 months ago

@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!

github-actions[bot] · 7 months ago

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.