[BUG] Bun v1.3.5 crashes on Windows with "integer does not fit in destination type" - prevents installation and startup
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?
Claude Code crashes immediately on startup and during installation on Windows 11 with a Bun runtime panic: integer does not fit in destination type. This affects both running Claude Code and attempting fresh installs via the PowerShell installer script.
The crash occurs in the bundled Bun v1.3.5 runtime. This specific bug was fixed in Bun v1.3.6 (released January 13, 2026), which includes a fix for this exact error when reading files on Windows systems with limited memory or on network drives.
What Should Happen?
Claude Code should start normally and installation should complete without Bun crashes.
Error Messages/Logs
Bun v1.3.5 (1e86cebd) Windows x64 (baseline)
Windows v.win11_dt
CPU: sse42 avx avx2
Args: "C:\Users\foo\.local\bin\claude.exe"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(33) jsc spawn(20) 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/posix" "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: 5272ms | User: 2390ms | Sys: 3390ms
RSS: 3.21GB | Peak: 3.22GB | Commit: 3.30GB | Faults: 797032 | Machine: 16.60GB
panic(thread 1552): integer does not fit in destination type
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Steps to Reproduce
- Run Claude Code on Windows 11:
claudeor attempt fresh installirm https://claude.ai/install.ps1 | iex - Observe crash with Bun
Claude Model
Other
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.1.9
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
- Bundled Bun Version: 1.3.5 (needs to be upgraded from Claude Code itself)
- Machine RAM: 16.60GB
Found 1 possible duplicate issue:
- https://github.com/anthropics/claude-code/issues/16691
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
Not the same issue at all.
I'm having the same issue!! HELP!
I fixed it, but this is the nuclear option - don't blame me if you use this (Powershell 7):
Remove-Item -Recurse -Force "$env:USERPROFILE.claude"
Same for me - unable to launch/update Claude on Windows.
Bun v1.3.5 (1e86cebd) Windows x64 (baseline)
panic(thread 10984): integer does not fit in destination type
Same issue:
panic(thread 16352): integer does not fit in destination type
2026-01-18 13:12:28.237 [info] From claude: 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:
2026-01-18 13:12:28.238 [info] From claude: https://bun.report/1.3.5/e_11e86cebGugogCw+kiM65ioJgqpmMCYKERNEL32.DLLut0LCSntdll.dll4zijBA0eNoFwcENACAMAsBVWM1ENHyosXzc3js53LyYxYYrWApkTHbkEZWRd/gBNAAPKQ
panic(thread 6124): integer does not fit in destination type 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.5/e_11e86cebGugogCw+kiM65ioJgqpmMCYKERNEL32.DLLut0LCSntdll.dll4zijBA0eNoFwcENACAMAsBVWM1ENHyosXzc3js53LyYxYYrWApkTHbkEZWRd/gBNAAPKQ
happened again to me out of the blue - had to use nuclear option again ... PITA
I started getting this error too, WIndows 11 powershell, I can't use Claude Code at all
panic(thread 1441708): integer does not fit in destination type oh no: Bun has crashed. This indicates a bug in Bun, not your code.
New Claude Code released but still having this issue. Have been unable to use both CLI or VS Code Extension this for days. Please fix this soon 🙏 I have 64gb of system ram and working on a local D drive and still having this issue.
I get the "integer does not fit in destination type" bun 1.3.5 variant as well. No workaround has fixed it. I am on Claude 2.1.14 on Windows, using Terminal, Powershell, and similar variations. All fail. The web interface is unavailable to me as an alternative due to our enterprise IT policy, sadly.
Seeing this issue as well. Not sure if it's related to the Claude Code process exited with code 3 error in the VSCode extension which also started happening recently (link)
For now my workaround is to use wsl instead of powershell or the GUI
Same issue. As summarized by Opus:
Updated Bug Report: Claude Code 2.1.15 crashes on startup with Bun panic on Windows
Summary
Claude Code CLI crashes immediately on startup with a Bun runtime panic (integer does not fit in destination type). Simple flags like --version and --help work, but launching the interactive CLI or any command that loads the full runtime fails.
Environment
| Component | Value |
|---|---|
| OS | Windows 11 (Build 10.0.26100.7623) |
| Claude Code Version | 2.1.15 |
| Installation Method | Native standalone (installMethod: "native") |
| Binary Location | %USERPROFILE%\.local\bin\claude.exe |
| Binary Size | 228,773,024 bytes (~218 MB) |
| Bundled Bun Version | 1.3.6 (d530ed99) |
| System RAM | 68.60 GB |
CPU Features
CPU: sse42 avx avx2 avx512
Tested Behavior
| Command | Shell | Result |
|---|---|---|
claude --version |
PowerShell | ✅ Returns 2.1.15 (Claude Code) |
claude --help |
PowerShell | ✅ Full help output displayed |
claude |
PowerShell | ❌ Bun panic crash |
claude |
CMD | ❌ Bun panic crash |
claude (clean env) |
CMD | ❌ Bun panic crash |
claude (from %USERPROFILE%) |
PowerShell | ❌ Bun panic crash |
Environment Variables Checked
Only unrelated variable present:
CODEX_MANAGED_BY_NPM = 1
No BUN_*, NODE_*, or NPM_* variables set.
Error Output
============================================================
Bun v1.3.6 (d530ed99) Windows x64 (baseline)
Windows v.win11_dt
CPU: sse42 avx avx2 avx512
Args: "claude"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(20) jsc spawn(10) 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/posix" "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: 1340ms | User: 875ms | Sys: 1375ms
RSS: 2.93GB | Peak: 2.93GB | Commit: 3.05GB | Faults: 720259 | Machine: 68.60GB
panic(thread 36048): integer does not fit in destination type
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Bun Crash Report URL
https://bun.report/1.3.6/e_1d530ed9GugogCsulmM6/1qJg6pqMCYKERNEL32.DLLut0LCSntdll.dll4zijBA0eNoFwcENACAMAsBVWM1ENHyosXzc3js53LyYxYYrWApkTHbkEZWRd/gBNAAPKQ
Memory State at Crash (Consistent Across Tests)
| Metric | Range |
|---|---|
| RSS | 2.88–2.93 GB |
| Peak | 2.88–2.93 GB |
| Commit | 2.96–3.05 GB |
| Page Faults | 709,733–720,259 |
Key Observations
- Consistent crash: Every invocation that loads the full runtime crashes identically
- Same crash signature: Thread ID varies, but panic message and memory profile are consistent
- Pre-runtime crash: Occurs before any user code, project, or config is loaded
- Shell-independent: Crashes in both PowerShell and CMD
- Environment-independent: Clean environment makes no difference
- Directory-independent: Working directory doesn’t affect crash
Probable Cause
The panic integer does not fit in destination type combined with:
- High memory consumption (~2.9 GB) before crash
- Involvement of
KERNEL32.DLLandntdll.dll - AVX-512 capable CPU
…suggests an integer overflow in Bun 1.3.6’s memory allocation or SIMD code paths, possibly triggered by:
- Windows 11 24H2 (Build 26100) memory management changes
- AVX-512 specific code paths
- Large standalone executable unpacking
Related Issues
- Bun issue tracker should be checked for similar Bun 1.3.6 panics on Windows
- This may be related to known Bun 1.3.x Windows regressions
Requested Actions
- Immediate: Provide a way to downgrade to a previous Claude Code version with working Bun runtime
- Short-term: Consider bundling Bun 1.2.x until 1.3.x Windows issues are resolved
- Investigation: Test Claude Code 2.1.15 on Windows 11 24H2 with AVX-512 CPUs
Workaround Requests
- Is there an npm-based installation method that uses system Node.js instead of bundled Bun?
- Can a previous version of Claude Code be manually installed?
- Are there environment variables to force Bun to use different code paths (e.g., disable AVX-512)?
Downgrade attempt summary
-
Tried installing Claude Code
v2.0.76to avoid Bun1.3.xusing:& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 2.0.76 -
Installer reported success, then crashed with a Bun panic:
panic(thread ...): integer does not fit in destination type -
Crash output indicates Bun
v1.3.6is running the installer binary with:Args: "C:\Users\ryant\.claude\downloads\claude-2.1.15-win32-x64.exe" "install" "2.0.76" -
Result: The downgrade path still uses the Bun
1.3.6installer (claude-2.1.15.exe) and crashes the same way, so it doesn’t avoid the Bun1.3.xcrash.
Also having the same problem, seems to be after a few windows updates that were rolled out on my machine yesterday afternoon
Workaround: temporarily switch back to the npm installation of Claude Code
We're planning to update the included version of bun to include this fix ASAP, but need to address a few blockers first.
Title: Bun panic on Windows: "integer does not fit in destination type" in
preadv
Body:
Environment
- Bun version: 1.3.5
- OS: Windows x86_64
- Context: Running Claude Code (npm) which uses Bun internally
Error
panic: integer does not fit in destination type
- sys_uv.zig:294: preadv
- node_fs.zig:5168: readFileWithOptions
- atomic.zig:50: fetchSub
Features: spawn, standalone_executable, process_dlopen, Bun.stderr, Bun.stdin,
Bun.stdout, fetch, jsc
Steps to Reproduce
- Install Claude Code via npm:
npm install -g @anthropic-ai/claude-code - Run
claudein a project directory on Windows - Crash occurs during file reading operations
Expected Behavior
File reading should complete without panic.
Notes
This appears to be an integer overflow in the preadv syscall wrapper on
Windows.
Well, present, one more on the list of those affected.
Same here. Waiting for a fix!
UPDATE (at least from my side): Fix confirmed for Windows 11 25H2
The crash is caused by Windows Update KB5074109 (Jan 14, 2026) breaking Bun v1.3.5.
My specs:
- Windows 11 25H2
- Claude Code Desktop App v2.1.15/v2.1.17
- KB5074109 installed Jan 14, 2026
Solution: Install Microsoft's out-of-band update KB5077744
- Download from Microsoft Update Catalog
- Install via PowerShell (Admin):
wusa.exe "path\to\windows11.0-kb5077744-x64_fb63f62e4846b81b064c3515d7aff46c9d6d50c8.msu" /quiet - Restart
| Windows Version | Fix |
|---|---|
| 25H2 / 24H2 | KB5077744 |
| 23H2 | KB5077797 |
Has anyone tried switching to the npm installation instead of the Native Installer? Claude suggests I try it, but that my expectations shouldn't be too high since it has the same dependency on bun.