[BUG] Bun v1.3.5 crashes on Windows with "integer does not fit in destination type" - prevents installation and startup
Open 💬 41 comments Opened Jan 16, 2026 by Dyl-M
💡 Likely answer: A maintainer (ant-kurt, collaborator)
responded on this thread — see the highlighted reply below.
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
41 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 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.
Same issue:
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 3error 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--versionand--helpwork, 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
Tested Behavior
|Command |Shell |Result |
|-------------------------------|----------|--------------------------------|
|
claude --version|PowerShell|✅ Returns2.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:
No
BUN_*,NODE_*, orNPM_*variables set.Error Output
Bun Crash Report URL
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
Probable Cause
The panic
integer does not fit in destination typecombined with:KERNEL32.DLLandntdll.dll…suggests an integer overflow in Bun 1.3.6’s memory allocation or SIMD code paths, possibly triggered by:
Related Issues
Requested Actions
Workaround Requests
Downgrade attempt summary
v2.0.76to avoid Bun1.3.xusing:``
powershell
``& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 2.0.76
``
text
``panic(thread ...): integer does not fit in destination type
v1.3.6is running the installer binary with:``
text
``Args: "C:\Users\ryant\.claude\downloads\claude-2.1.15-win32-x64.exe" "install" "2.0.76"
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
## Error
panic: integer does not fit in destination type
Features: spawn, standalone_executable, process_dlopen, Bun.stderr, Bun.stdin,
Bun.stdout, fetch, jsc
## Steps to Reproduce
npm install -g @anthropic-ai/claude-codeclaudein a project directory on Windows## Expected Behavior
File reading should complete without panic.
## Notes
This appears to be an integer overflow in the
preadvsyscall wrapper onWindows.
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:
Solution: Install Microsoft's out-of-band update KB5077744
``
powershell
``wusa.exe "path\to\windows11.0-kb5077744-x64_fb63f62e4846b81b064c3515d7aff46c9d6d50c8.msu" /quiet
| 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.
Yes, npm works.
I can confirm the issue went away for me after switching to the npm install. Used claude web to give me step by step on how to uninstall native and backup settings
+1 experiencing this issue
Environment:
Crash details:
Crash log:
Bun v1.3.5 (1e86cebd) Windows x64 (baseline)
panic(thread): integer does not fit in destination type
https://bun.report/1.3.5/e_11e86cebmgEugogCw+kiM65ioJgqpmMCYKERNEL32.DLLut0LCSntdll.dll4zijBA0eNoFwcENACAMAsBVWM1ENHyosXzc3js53LyYxYYrWApkTHbkEZWRd/gBNAAPKQ
Requesting priority update to Bun 1.3.6 which has the fix.
@ant-kurt Feel free to close the comments section for now if you think there is no further information to add. This will prevent more people from saying they are experiencing the same problem. Now that your teams are aware of the issue, the spam is no longer useful. Plus, it seems that your workaround with the npm installation is working.
edit: Keep the issue open, though, so that we can keep track of it.
Investigation Results
I investigated the bundled Bun version across different Claude Code releases:
| Version | Location | Embedded Bun |
|:-------:|:---------|------------:|
| 2.1.7 |
.vscode/extensions/| 1.3.5 || 2.1.21 |
.vscode/extensions/| 1.3.5 |All versions (including the latest 2.1.21) still bundle Bun v1.3.5.
Interesting Finding
Both 2.1.7 and 2.1.21 use Bun 1.3.5, but:
The bundled JavaScript code is different (different file sizes and hashes), suggesting that new code in 2.1.21 may trigger the Bun bug more frequently due to different file I/O patterns, memory usage, or code paths.
Crash Report
https://bun.report/1.3.5/e_11e86cebGugogCw+kiM65ioJgqpmMCYKERNEL32.DLLut0LCSntdll.dll4zijBA0eNoFwcENACAMAsBVWM1ENHyosXzc3js53LyYxYYrWApkTHbkEZWRd/gBNAAPKQ
Relevant Bun Fixes
Bun v1.3.6 (Release Notes)
Bun v1.3.7 (Release Notes)
Request
Would it be possible to rebuild the native binary with Bun v1.3.6 or later? The fix has been available since January 13, 2026.
Environment
<img width="563" height="867" alt="Image" src="https://github.com/user-attachments/assets/2d02e7f1-6367-4e92-a6e2-b7a6a61c6ccc" />
Updating to KB5077744 (Out of Band Update) fixed this for me. Thanks @D-Ac3
Edit: This appears to have re-broken short after this update, due to another update. I guess npm (rather than native) is the way to go for now.
tried it on the first day of the bun release, and again today. still same problem.
used NPM until now without a problem since my first attempt, i have to go back to NPM again
Indeed this has been happening for a while now and keeps happening with Windows native build. Using the npm version and it works well. Please don't deprecate the npm version because we'd be unable to use claude coda.
Here's my (currently working) workaround to get it working on NPM on v2.1.29 (latest)
NOTE - the below is generated by claude.ai (web interface) after a compact. it may (and probably does) include incorrect steps. use if you have no other option. it was quite painful.
----------------
Workaround: npm install bypasses the Bun crash
The native installer bundles Bun 1.3.5 which has this crash. The npm package uses Node.js instead, so it avoids the bug entirely.
Steps
1. Remove the native installer binary:
2. Clear cached native downloads (important — the npm package will try to bootstrap the native binary otherwise):
3. Install via npm (requires Node.js 18+):
4. Verify:
Notes
~/.claude.json) and project settings are preservedEnvironment
Also affected — Bun 1.3.5 segfault on Windows 11 (native standalone installer)
Every time I run the standalone installer (irm https://claude.ai/install.ps1 | iex), it crashes with the same Bun 1.3.5 segfault:
panic(thread 25500): Segmentation fault at address 0x3C
The npm install (npm install -g @anthropic-ai/claude-code) works and Claude Code runs fine, but Shift+Tab keybindings don't work on the npm version in Windows Terminal — PowerShell passes the keypress correctly (confirmed with [Console]::ReadKey), but Claude Code doesn't receive it. Alt+M works as a workaround.
This seems to be because the npm build handles terminal input differently to the native build. So the Bun crash is blocking both the native install AND proper keyboard shortcut support.
Would really appreciate getting Bun 1.3.6+ bundled so the native installer stops crashing.
Environment:
Windows 11 (Build 26200)
PowerShell 7.5.4
Windows Terminal
Claude Code 2.1.31 (npm-global)
CPU: sse42 avx avx2 avx512
Per email from Anthropic Support Team:
Mentioned version is probably 2.1.32, released today. But it's hard to know for sure, as I don't see anything in the CHANGELOG that points in that direction.
If anyone from Anthropic or anyone else experiencing this issue can confirm whether or not it has been resolved, that would help move things forward (since I haven't encountered the problem since I used the workaround).
have you tried updating? is the bug solved there?
thanks for sharing
Yes it did fix it. It seems the newer version of bun and a fresh install seemed to sort it out. Phew was getting worried there!
yep works for me too now! and has opus4.6 thanks mate.
happy shipping
I can still reproduce the same Bun panic from #18567 on Windows with newer Claude Code.
Environment
Crash signature
panic(thread ...): integer does not fit in destination type
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Observed behavior
Additional data point
In my case, very large local Claude session files existed under
.claude/projects(multiple files around 0.5GB to >2GB each). Moving those oversized files out of the active projects directory made the crash stop immediately.Minimal repro direction
.claude/projects(hundreds of MB to multi-GB)claudeinteger does not fit in destination typeThis looks like the same underlying Bun panic as #18567, potentially with a broader trigger set related to large local state.
Hello, I can confirm that I managed to upgrade from npm to native installer in Windows 11 (using powershell 7) and everything seems to work fine again
Update: Regression on Bun 1.3.9-canary
Previously confirmed that upgrading to Bun 1.3.8 (via irm https://claude.ai/install.ps1 | iex) completely fixed both the segfault and Shift+Tab keybindings on the native build. Everything was rock solid.
Now on Bun Canary v1.3.9-canary.51 (d5628db2), the segfault is back — same address 0x3C, same USER32.dll stack trace. Key difference: it's not crashing on startup like the old 1.3.5 bug. Claude Code runs fine, Shift+Tab still works, but it segfaulted mid-session after ~20 minutes of use. Restarted and it's fine again.
Crash report: https://bun.report/1.3.9/e_2d5628dbmgkgEuhogCCYnpggNT64.desy2TCYnpggNT64.desynouE__CYnpggNT64.desws0PCUUSER32.dllgg1vBCYnpggNT64.desgi6R____CYnpggNT64.desoqmWA2A4D
Environment:
Windows 11
Bun Canary v1.3.9-canary.51 (d5628db2)
CPU: sse42 avx avx2 avx512
RSS at crash: 0.78GB / Peak: 1.03GB
TL;DR: 1.3.8 stable = solid. 1.3.9-canary = regression. Not a blocker (restarts fine) but something got reintroduced between those versions.
Hit this too on Windows 11. Switching to
npm i -g @anthropic-ai/claude-codefixed it — avoids Bun entirely.Also swapped my statusline plugin for cc-hud (pure Node.js, no deps). Rock solid now.
Environment: Windows 11, Claude Code CLI
Error: Bun crash on startup
Workaround: WSL2 Ubuntu (functional but not ideal)
This is a blocker for Windows users.
Please prioritize a fix.
Any solution for this?
I am also facing the same with my team members.
Install native . If can uninstall claude code cause their support is poor and ban wave for nothing