Bun crashes with segfault on Claude Code launch/resume (v2.1.229, Windows)
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?
When resuming a session with --resume, Claude Code crashes immediately with a segmentation fault. The bundled Bun runtime panics and exits with code 3.
This happens on Windows 10 (build 26200), Claude Code v2.1.229, using model claude-opus-5 with effort=high.
stderr output:
Bun v1.4.0 (8bb8d04c4) Windows x64
Windows v10.26200
CPU: sse42 avx avx2
Args: "<home>\AppData\Roaming\Claude\claude-code\2.1.229\claude.exe" "--output-format" "stream-json" "--verbose" "--input-format" "stream-json" "--effort" "high" "--model" "claude-opus-5" "--permission-prompt-tool" "stdio" "--resume"...
panic(main thread): Segmentation fault at address 0x7FF47076F318
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.4.0/<blob>//Bwx57uwD
What Should Happen?
Claude Code should resume the session normally without the underlying Bun runtime crashing.
Error Messages/Logs
Claude Code process exited with code 3. stderr: ============================================================
Bun v1.4.0 (8bb8d04c4) Windows x64
Windows v10.26200
CPU: sse42 avx avx2
Args: "<home>\AppData\Roaming\Claude\claude-code\2.1.229\claude.exe" "--output-format" "stream-json" "--verbose" "--input-format" "stream-json" "--effort" "high" "--model" "claude-opus-5" "--permission-prompt-tool" "stdio" "--resume"...
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(2) jsc spawn(13) standalone_executable yaml_parse(42) claude_code
Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:dns" "node:dns/promises" "node:events" "node:fs" "node:fs/promises" "node:http" "node:http2" "node:https" "node:module" "node:net" "node:os" "node:path" "node:path/posix" "node:path/win32" "node:perf_hooks" "node:process" "node:readline" "node:stream" "node:stream/consumers" "node:stream/promises" "node:string_decoder" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:vm" "node:zlib" "ws"
Elapsed: 1910ms | User: 1390ms | Sys: 593ms
RSS: 0.56 GB | Peak: 0.58 GB | Commit: 0.63 GB | Faults: 154958 | Machine: 34.1 GB
panic(main thread): Segmentation fault at address 0x7FF47076F318
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.4.0/<blob>//Bwx57uwD
============================================================
Bun v1.4.0 (8bb8d04c4) Windows x64
Windows v10.26200
CPU: sse42 avx avx2
Args: "<home>\AppData\Roaming\Claude\claude-code\2.1.229\claude.exe" "--output-format" "stream-json" "--verbose" "--input-format" "stream-json" "--effort" "high" "--model" "claude-opus-5" "--permission-prompt-tool" "stdio" "--resume"...
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(2) jsc spawn(13) standalone_executable yaml_parse(42) claude_code
Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:dns" "node:dns/promises" "node:events" "node:fs" "node:fs/promises" "node:http" "node:http2" "node:https" "node:module" "node:net" "node:os" "node:path" "node:path/posix" "node:path/win32" "node:perf_hooks" "node:process" "node:readline" "node:stream" "node:stream/consumers" "node:stream/promises" "node:string_decoder" "node:timers/promises" "node:tls" "node:tty
Elapsed: 1910ms | User: 1390ms | Sys: 593ms
RSS: 0.56 GB | Peak: 0.58 GB | Commit: 0.63 GB | Faults: 154958 | Machine: 34.1 GB
panic(main thread): Segmentation fault at address 0x7FF47076F318
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.4.0/<blob>//Bwx57uwD
Steps to Reproduce
Claude Code process exited with code 3. stderr: ============================================================
Bun v1.4.0 (8bb8d04c4) Windows x64
Windows v10.26200
CPU: sse42 avx avx2
Args: "<home>\AppData\Roaming\Claude\claude-code\2.1.229\claude.exe" "--output-format" "stream-json" "--verbose" "--input-format" "stream-json" "--effort" "high" "--model" "claude-opus-5" "--permission-prompt-tool" "stdio" "--resume"...
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(2) jsc spawn(13) standalone_executable yaml_parse(42) claude_code
Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:dns" "node:dns/promises" "node:events" "node:fs" "node:fs/promises" "node:http" "node:http2" "node:https" "node:module" "node:net" "node:os" "node:path" "node:path/posix" "node:path/win32" "node:perf_hooks" "node:process" "node:readline" "node:stream" "node:stream/consumers" "node:stream/promises" "node:string_decoder" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:vm" "node:zlib" "ws"
Elapsed: 1910ms | User: 1390ms | Sys: 593ms
RSS: 0.56 GB | Peak: 0.58 GB | Commit: 0.63 GB | Faults: 154958 | Machine: 34.1 GB
panic(main thread): Segmentation fault at address 0x7FF47076F318
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.4.0/<blob>//Bwx57uwD
============================================================
Bun v1.4.0 (8bb8d04c4) Windows x64
Windows v10.26200
CPU: sse42 avx avx2
Args: "<home>\AppData\Roaming\Claude\claude-code\2.1.229\claude.exe" "--output-format" "stream-json" "--verbose" "--input-format" "stream-json" "--effort" "high" "--model" "claude-opus-5" "--permission-prompt-tool" "stdio" "--resume"...
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(2) jsc spawn(13) standalone_executable yaml_parse(42) claude_code
Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:dns" "node:dns/promises" "node:events" "node:fs" "node:fs/promises" "node:http" "node:http2" "node:https" "node:module" "node:net" "node:os" "node:path" "node:path/posix" "node:path/win32" "node:perf_hooks" "node:process" "node:readline" "node:stream" "node:stream/consumers" "node:stream/promises" "node:string_decoder" "node:timers/promises" "node:tls" "node:tty
Elapsed: 1910ms | User: 1390ms | Sys: 593ms
RSS: 0.56 GB | Peak: 0.58 GB | Commit: 0.63 GB | Faults: 154958 | Machine: 34.1 GB
panic(main thread): Segmentation fault at address 0x7FF47076F318
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.4.0/<blob>//Bwx57uwD
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.229
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Terminal.app (macOS)
Additional Information
This crash occurred inside the Claude desktop app on Windows (not a standalone terminal) — Claude Code is spawned internally by the desktop app.
Args used: --output-format stream-json --verbose --input-format stream-json --effort high --model claude-opus-5 --permission-prompt-tool stdio --resume
System: Windows 10 (build 26200), CPU sse42/avx/avx2, Machine RAM 34.1 GB
Bun crash report link generated: https://bun.report/1.4.0/<blob>//Bwx57uwD