[BUG] Segmentation fault in Bun v1.3.10 (Windows) during long sessions — pipe write crash
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
- Claude Code: v2.1.50
- OS: Windows 11 Pro (10.0.26200)
- Bun: v1.3.10 (1423d3c8) x86_64_baseline (bundled in claude.exe)
## Description
Claude Code crashes with a segmentation fault during long sessions (~3.5 minutes).
This appears to be a bug in the bundled Bun runtime on Windows.
## Crash Details
Elapsed: 211149ms | User: 3843ms | Sys: 984ms
RSS: 0.71GB | Peak: 0.77GB | Commit: 0.99GB
Segmentation fault at address 0xFFFFFFFFFFFFFFFF
Stack trace:
- Allocator.zig:141: rawRemap
- array_list.zig:422: clearRetainingCapacity
- pipe.c:2211: uv__process_pipe_write_req
- core.c:579: uv__process_reqs
- core.c:736: uv_run
- VirtualMachine.zig:340: onAfterEventLoop
## Bun crash report URL
https://bun.report/1.3.10/e_11423d3cmgkgE+hogCgn92Wk+n1tB4kz/pC41j7pC6kh7pConrqXo8r0U23wN+o5gUmznlOqn4kOwkkqvDCYKERNEL32.DLLut0LCSntdll.dll4gijBA2DD
## Steps to Reproduce
- Start Claude Code on Windows 11
- Run a long task involving multiple file reads (e.g., loading a project and resuming work)
- After ~3.5 minutes, Claude Code crashes with segfault
## Expected Behavior
Claude Code should continue running without crashing.
What Should Happen?
Claude Code should continue running without crashing throughout the session, regardless of session length or memory usage.
Error Messages/Logs
Bun v1.3.10 (1423d3c8) Windows x64 (baseline)
Windows v.win11_dt
CPU: sse42 avx avx2
Args: "C:\Users\haruc\.local\bin\claude.exe"
Elapsed: 211149ms | User: 3843ms | Sys: 984ms
RSS: 0.71GB | Peak: 0.77GB | Commit: 0.99GB | Faults: 334562
panic(main thread): Segmentation fault at address 0xFFFFFFFFFFFFFFFF
Steps to Reproduce
- Start Claude Code on Windows 11
- Open a project and ask Claude to read multiple files (e.g., "read this project and resume work")
- Wait ~3.5 minutes while Claude performs file operations
- Claude Code crashes with segmentation fault
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.50 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Cursor
Additional Information
Additional Information:
The crash occurs inside claude.exe's bundled Bun runtime (v1.3.10), not in user code.
Bun crash report URL: https://bun.report/1.3.10/e_11423d3cmgkgE+hogCgn92Wk+n1tB4kz/pC41j7pC6kh7pConrqXo8r0U23wN+o5gUmznlOqn4kOwkkqvDCYKERNEL32.DLLut0LCSntdll.dll4gijBA2DD
The stack trace points to uv__process_pipe_write_req on Windows, suggesting a pipe/stdout handling bug in the bundled Bun runtime on Windows x86_64_baseline.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗