[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_
19 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 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 here. Every command will trigger this issue.
This is the crash report: https://bun.report/1.3.10/W_11423d3cmgkgEuhogCwmzrfg36uiBw4sC4k8gmCg916lCg6xjkBgsjufCYKERNEL32.DLLg0jCCSntdll.dlloqi1BA0eNrLzEvOLypKTS5RSMzJTM/LTc0rAQBMcwep
Same with 2.1.47.
2.1.45 does not seem to have this 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:
C:\Users\aaron\.local\bin\claude.exeCrash 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:
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.This was the cause for me.
https://github.com/ramensoftware/windhawk/issues/836
Adding
claude.exeto 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](<https://github.com/oven-sh/bun/tree/2a41ca974b7302952252a20eddbb3b5c3f2dee9b>)) on windows x86_64_baseline [StandaloneExecutable]panic: integer overflow
Allocator.zig:443](<https://github.com/oven-sh/zig/blob/bun-2a41ca974b7302952252a20eddbb3b5c3f2dee9b/lib/std/mem/Allocator.zig#L443>):freearray_list.zig:655](<https://github.com/oven-sh/zig/blob/bun-2a41ca974b7302952252a20eddbb3b5c3f2dee9b/lib/std/array_list.zig#L655>):deinitHTTPContext.zig:220](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/HTTPContext.zig#L220>):deinitref_count.zig:148](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/ptr/ref_count.zig#L148>):derefWithContextref_count.zig:118](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/ptr/ref_count.zig#L118>):derefhttp.zig:755](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/http.zig#L755>):deinitAsyncHTTP.zig:400](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/AsyncHTTP.zig#L400>):onAsyncHTTPCallbackhttp.zig:2538](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/http.zig#L2538>):wrapped_callbackhttp.zig:2524](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/http.zig#L2524>):runhttp.zig:2212](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/http.zig#L2212>):failhttp.zig:438](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/http.zig#L438>):onCloseHTTPContext.zig:462](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/HTTPContext.zig#L462>):onCloseuws_handlers.zig:229](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/runtime/socket/uws_handlers.zig#L229>):fwduws_handlers.zig:241](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/runtime/socket/uws_handlers.zig#L241>):onClosevtable.zig:61](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/uws_sys/vtable.zig#L61>):callvtable.zig:84](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/uws_sys/vtable.zig#L84>):on_closeopenssl.c:952](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/packages/bun-usockets/src/crypto/openssl.c#L952>):us_internal_ssl_on_closesocket.c:306](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/packages/bun-usockets/src/socket.c#L306>):us_internal_socket_close_rawcontext.c:125](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/packages/bun-usockets/src/context.c#L125>):us_socket_group_close_all_exSocketGroup.zig:74](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/uws_sys/SocketGroup.zig#L74>):closeAllHTTPContext.zig:224](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/HTTPContext.zig#L224>):deinitref_count.zig:148](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/ptr/ref_count.zig#L148>):derefWithContextref_count.zig:118](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/ptr/ref_count.zig#L118>):derefhttp.zig:755](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/http.zig#L755>):deinitAsyncHTTP.zig:400](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/AsyncHTTP.zig#L400>):onAsyncHTTPCallbackhttp.zig:2538](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/http.zig#L2538>):wrapped_callbackhttp.zig:2524](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/http.zig#L2524>):runhttp.zig:2212](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/http.zig#L2212>):failhttp.zig:450](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/http.zig#L450>):onTimeoutHTTPContext.zig:558](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/HTTPContext.zig#L558>):onLongTimeoutuws_handlers.zig:229](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/runtime/socket/uws_handlers.zig#L229>):fwduws_handlers.zig:247](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/runtime/socket/uws_handlers.zig#L247>):onLongTimeoutvtable.zig:61](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/uws_sys/vtable.zig#L61>):callvtable.zig:92](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/uws_sys/vtable.zig#L92>):on_long_timeoutloop.c:212](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/packages/bun-usockets/src/loop.c#L212>):us_internal_timer_sweeptimer.c:192](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/vendor/libuv/src/timer.c#L192>):uv__run_timerscore.c:750](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/vendor/libuv/src/win/core.c#L750>):uv_runLoop.zig:273](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/uws_sys/Loop.zig#L273>):runHTTPThread.zig:643](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/HTTPThread.zig#L643>):processEventsHTTPThread.zig:253](<https://github.com/oven-sh/bun/blob/2a41ca974b7302952252a20eddbb3b5c3f2dee9b/src/http/HTTPThread.zig#L253>):onStartThread.zig:509](<https://github.com/oven-sh/zig/blob/bun-2a41ca974b7302952252a20eddbb3b5c3f2dee9b/lib/std/Thread.zig#L509>):callFnThread.zig:622](<https://github.com/oven-sh/zig/blob/bun-2a41ca974b7302952252a20eddbb3b5c3f2dee9b/lib/std/Thread.zig#L622>):entryFnFeatures: spawn, standalone\_executable, yaml\_parse, claude\_code, Bun.stderr, Bun.stdin, Bun.stdout, abort\_signal, fetch, http\_server, jsc