[BUG] Linux: Bun runtime segfault on Linux (claude-code 2.1.143, Bun 1.3.14, Ubuntu 24.04 / kernel 6.18.x)
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?
Bug: Bun runtime segfault on Linux (claude-code 2.1.143, Bun 1.3.14)
Claude Code crashes at least once a day with a Bun-level segfault. Bundled Bun panics before any JS handler can catch it, so --debug and stderr show only the Bun crash report. Happens during normal interactive sessions; no specific tool call reliably triggers it.
Environment
- Claude Code:
2.1.143 - Bun (bundled):
1.3.14 (d2989145)— baseline x86_64 build - OS: Ubuntu 24.04.4 LTS (Noble), kernel
6.18.7-76061807-generic - glibc:
2.39 - CPU features reported by Bun:
sse42 popcnt avx avx2 - RSS at crash: 0.22 GB (peak 0.70 GB) on a 24.76 GB machine — not OOM.
- Elapsed before crash: ~9120 s (~2.5 h session)
Crash output
panic: Segmentation fault at address 0x22578AE5C60
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Illegal instruction (core dumped)
Notes
- Multiple BUN bug reports have also been filed - the latest at https://bun.report/1.3.14/B_1d298914mgkgkEuhogC4wvo4E+ypRg6rh8Cs+9v6C29gw6Cyj18zD+wmznEiroznEkhvynEysiynE0+n+hDy6zj8CmqlnB2muqCA2qiBgmu514D
- Not deterministic. Occurs mid-session after long-running use; no specific MCP server or tool consistently precedes it.
- I will be attempting to revert to Claude Code
2.1.112as a workaround until this bug can be resolved.
Asks
- Is the bundled Bun version pinnable, or planned to advance past 1.3.14?
- Any way to capture a real core dump or stack from inside the bundled Bun for future crashes?
- Known-good Claude Code version for Ubuntu 24.04 / kernel 6.18.x users while this is investigated.
What Should Happen?
Claude and Bun should not crash
Error Messages/Logs
Bun v1.3.14 (d2989145) Linux x64 (baseline)
Linux Kernel v6.18.7 | glibc v2.39
CPU: sse42 popcnt avx avx2end
Args: "claude"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) abort_signal(85) fetch(593) jsc spawn(132) standalone_executable process_dlopen yaml_parse(29) claude_code
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:dns" "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: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" "node:http2"
Elapsed: 9120252ms | User: 510522ms | Sys: 102347ms
RSS: 0.22GB | Peak: 0.70GB | Commit: 0.22GB | Faults: 0 | Machine: 24.76GB
panic: Segmentation fault at address 0x22578AE5C60
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.14/B_1d298914mgkgkEuhogC4wvo4E+ypRg6rh8Cs+9v6C29gw6Cyj18zD+wmznEiroznEkhvynEysiynE0+n+hDy6zj8CmqlnB2muqCA2qiBgmu514D
Illegal instruction (core dumped)
Steps to Reproduce
Apparently, the steps to reproduce is use Claude in a session at least 2 hours...
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.143
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗