[BUG] Claude Code crashes with Bun panic in Visual Studio Code on Windows 11
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?
Environment OS: Windows 11 VS Code Extension: Claude Code v2.1.11 Bundled Bun version: v1.3.5 (1e86cebd) CPU: x64 (baseline) with sse42, avx, avx2
Problem Claude's code constantly crashes when opening a certain project, but even on projects that work, the error appears. The extension works fine on other projects. The crash occurs during initialization with a Bun panic error.
Observations
- The --model "d" argument appears truncated/corrupted (should be full model name or "default")
- Memory usage is very high (3.54GB RSS) before crash
- Crash happens consistently on this project but not on others
- Crash report URL: https://bun.report/1.3.5/e_11e86cebGugogCw+kiM65ioJgqpmMCYKERNEL32.DLLut0LCSntdll.dll4zijBA0eNoFwcENACAMAsBVWM1ENHyosXzc3js53LyYxYYrWApkTHbkEZWRd/gBNAAPKQ
What I tried (none of these helped)
- Installed global Bun v1.3.6 (extension still uses bundled v1.3.5)
- Deleted .claude folder in project directory
- Deleted tmpclaude-* temporary folders
- Reinstalled the extension
- Restarted VS Code
What Should Happen?
Expected behavior Claude Code should start normally without crashing.
Additional context The project is a medium-sized backend application with multiple subfolders. Other projects open without issues on the same machine with the same extension version.
Error Messages/Logs
Args: "c:\Users\ACER\.vscode\extensions\anthropic.claude-code-2.1.11-win32-x64\resources\native-binary\claude.exe" "--output-format" "stream-json" "--verbose" "--input-format" "stream-json" "--max-thinking-tokens" "0" "--model" "d"...
Elapsed: 4531ms | User: 2250ms | Sys: 2265ms
RSS: 3.54GB | Peak: 3.54GB | Commit: 3.56GB | Faults: 873251 | Machine: 34.19GB
panic(thread 18532): integer does not fit in destination type
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Steps to Reproduce
- Install Claude Code extension v2.1.11 on VS Code (Windows 11)
- Open a project with multiple subfolders and files (in my case:
c:\Project_programing\Work\Yieldy\nytroseo\back) - Open Claude Code panel in VS Code
- Extension attempts to initialize and index the project
- Bun crashes with panic error before Claude Code becomes usable
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.11
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
No response
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/19439
- https://github.com/anthropics/claude-code/issues/19453
- https://github.com/anthropics/claude-code/issues/18567
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
I started getting this too, I can't use claude code
panic(thread 1441708): integer does not fit in destination type oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Same with 2.1.47.
Bun v1.3.10 (1423d3c8) Windows arm64
Windows v.win11_dt
CPU: neon fp aes crc32 atomics
Args: "C:\Users\rober\.local\bin\claude.exe"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) abort_signal(2) fetch(17) jsc spawn(11) standalone_executable process_dlopen(2) yaml_parse(5)
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "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:stream" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:zlib" "node:worker_threads" "undici" "ws" "node:http2"
Elapsed: 60900ms | User: 5921ms | Sys: 1515ms
RSS: 0.61GB | Peak: 0.66GB | Commit: 0.79GB | Faults: 234909 | Machine: 33.90GB
panic(thread 29508): incorrect alignment
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
2.1.45 does not seem to have this issue.
2.1.49 still has the issue.
2.1.49 still has the issue.
I use 2.1.47. But doesn`t try newest version
Further note: I am using claude CLI, and just starting claude and waiting about a minute will cause a crash. You don't have to do anything, just run claude and wait.
Experiencing the same class of crash on Windows 11 ARM64.
Environment:
- OS: Windows 11 Home ARM64 (10.0.26200)
- Bun: v1.3.10 (1423d3c8) Windows arm64
- Binary:
C:\Users\aaron\.local\bin\claude.exe
Crash output: panic(thread 20224): incorrect alignment oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Elapsed: 82510ms | User: 1890ms | Sys: 812ms RSS: 0.54GB | Peak: 0.58GB | Commit: 0.76GB | Faults: 163483 | Machine: 33.90GB
Also noting: the crash report link shown in the terminal is broken/non-functional.
Same crash - happens quite a lot.
I also see random Bun crashes, Claude Code has 5k+ issues, this is getting crazy
Same crash, happens every single time directly in CC. Version 2.1.50
For 5 days, Bun has been crashing every time. It was totally unusable. I went back to the Node.js version (npm) and all is good again.
Crashes even if you don't use Bun.
Same scenario as @XekriRedmane described:
- Claude Code CLI v2.1.51
- Crashes with Bun out of memory error regularly, regardless of activity
- OS: Windows 10 Home Edition
The problem resolved after system restart. Looks like a memory leak 🤷
Is anyone using software like Windhawk (https://windhawk.net/)? I noticed the bun crash happens when it's active.
Same crash here on Windows 11. Found that statusline plugins make it way worse — they fire on every tick, so Bun's allocator gets hammered constantly.
Switched to npm i -g @anthropic-ai/claude-code + cc-hud (lightweight Node.js statusline). No crashes since.
Is anyone using software like Windhawk (https://windhawk.net/)? I noticed the bun crash happens when it's active.
This was the cause for me.
https://github.com/ramensoftware/windhawk/issues/836
Adding claude.exe to Windhawk's exclusion list (under settings / advanced settings / more advanced settings) is a workaround to fix this.
same for me, its the report from claude cli runing in terminal on webstorm
un v1.3.14 (2a41ca9) on windows x86_64_baseline [StandaloneExecutable]
panic: integer overflow
Allocator.zig:443:freearray_list.zig:655:deinitHTTPContext.zig:220:deinitref_count.zig:148:derefWithContextref_count.zig:118:derefhttp.zig:755:deinitAsyncHTTP.zig:400:onAsyncHTTPCallbackhttp.zig:2538:wrapped_callbackhttp.zig:2524:runhttp.zig:2212:failhttp.zig:438:onCloseHTTPContext.zig:462:onCloseuws_handlers.zig:229:fwduws_handlers.zig:241:onClosevtable.zig:61:callvtable.zig:84:on_closeopenssl.c:952:us_internal_ssl_on_closesocket.c:306:us_internal_socket_close_rawcontext.c:125:us_socket_group_close_all_exSocketGroup.zig:74:closeAllHTTPContext.zig:224:deinitref_count.zig:148:derefWithContextref_count.zig:118:derefhttp.zig:755:deinitAsyncHTTP.zig:400:onAsyncHTTPCallbackhttp.zig:2538:wrapped_callbackhttp.zig:2524:runhttp.zig:2212:failhttp.zig:450:onTimeoutHTTPContext.zig:558:onLongTimeoutuws_handlers.zig:229:fwduws_handlers.zig:247:onLongTimeoutvtable.zig:61:callvtable.zig:92:on_long_timeoutloop.c:212:us_internal_timer_sweeptimer.c:192:uv__run_timerscore.c:750:uv_runLoop.zig:273:runHTTPThread.zig:643:processEventsHTTPThread.zig:253:onStartThread.zig:509:callFnThread.zig:622:entryFn
Features: spawn, standalone_executable, yaml_parse, claude_code, Bun.stderr, Bun.stdin, Bun.stdout, abort_signal, fetch, http_server, jsc