[BUG] Intermittent Bun segfault at address 0x3C on session start — "Claude Code process exited with code 3" (Windows 11, Desktop app)
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?
Starting a session from the Claude Desktop app on Windows intermittently fails with "Claude Code process exited with code 3". The bundled claude.exe (Bun v1.4.0 standalone executable) panics with Segmentation fault at address 0x3C roughly 200–850 ms into startup, before initialization completes.
Once a session hits this, resuming that session crashes the same way every time (the CLI dies before init), while a brand-new chat using the exact same binary usually works fine — so the crash is intermittent per process start, not machine-wide.
Observed on Claude Code 2.1.202 and 2.1.205 (both auto-provisioned by the Desktop app, version 1.20186.1.0 from the Microsoft Store).
Bun crash report: https://bun.report/1.4.0/e_163bb0camgggkEugogCCYnpggNT64.desy2TCYnpggNT64.desynouE_A2A4D
This looks like the same crash address as #35990 and #51477, and oven-sh/bun#27940 (closed as "not planned" upstream).
Environment notes: Visual C++ Redistributable 14.44 is installed; CPU supports AVX2/AVX512 (crash occurs in the baseline Bun build); 66 GB RAM; no VM.
What Should Happen?
The session should start normally — claude.exe should not segfault during startup, and resuming a previously-crashed session should recover instead of crashing identically every time.
Error Messages/Logs
Error: Claude Code process exited with code 3
at _U.getProcessExitError (C:\Program Files\WindowsApps\Claude_1.20186.1.0_x64__pzs8sxrjxfjjc\app\resources\app.asar\.vite\build\index.chunk-CvbeGVMj.js:80:8430)
at ChildProcess.n (...)
at ChildProcess._handle.onexit (node:internal/child_process:295:12)
CLI stderr tail (first start, v2.1.205):
============================================================
Bun v1.4.0 (63bb0ca0d) Windows x64 (baseline)
Windows v10.26200
CPU: sse42 avx avx2 avx512
Args: "<home>\AppData\Roaming\Claude\claude-code\2.1.205\claude.exe" "--output-format" "stream-json" "--verbose" "--input-format" "stream-json" "--effort" "high" "--model" "claude-fable-5" "--permission-prompt-tool" "stdio" "--allo"...
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(2) jsc spawn(13) standalone_executable yaml_parse(18) claude_code
Elapsed: 849ms | User: 562ms | Sys: 203ms
RSS: 0.31 GB | Peak: 0.31 GB | Commit: 0.49 GB | Faults: 80575 | Machine: 66.1 GB
panic(thread 26800): Segmentation fault at address 0x3C
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
https://bun.report/1.4.0/e_163bb0camgggkEugogCCYnpggNT64.desy2TCYnpggNT64.desynouE_A2A4D
CLI stderr tail (resume attempt, same session, 18 minutes later):
============================================================
Bun v1.4.0 (63bb0ca0d) Windows x64 (baseline)
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) jsc spawn(2) standalone_executable claude_code
Elapsed: 232ms | User: 171ms | Sys: 125ms
RSS: 0.24 GB | Peak: 0.24 GB | Commit: 0.31 GB | Faults: 60462 | Machine: 66.1 GB
panic(thread 15168): Segmentation fault at address 0x3C
An identical segfault (address 0x3C) also occurred on v2.1.202:
Args: "<home>\AppData\Roaming\Claude\claude-code\2.1.202\claude.exe" ...
Elapsed: 690ms | panic(thread 26592): Segmentation fault at address 0x3C
Steps to Reproduce
- On Windows 11, open the Claude Desktop app (Microsoft Store build 1.20186.1.0) and start a new local Claude Code session (cwd
C:\Claude, modelclaude-fable-5, effort high, remote MCP connectors enabled). - Send the first message.
- Intermittently, the spawned
claude.exeexits with code 3 before init — Bun panics withSegmentation fault at address 0x3C(stderr above). The app shows "Claude Code process exited with code 3". - Resume the affected session: the crash reproduces 100% of the time for that session.
- Start a brand-new chat with the same binary: it usually starts fine.
No reliable trigger found — the same binary works in one session and segfaults in another. Crash timing varies (232–849 ms in), and the feature counters in the crash header differ between crashes (e.g. spawn(2) vs spawn(13), with/without yaml_parse(18)), so the faulting code path may be timing/race dependent.
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.205 (auto-provisioned by Claude Desktop 1.20186.1.0; identical crash previously on 2.1.202)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
_No response_