[BUG] Bun segfault (SIGSEGV at 0x0) on exit - macOS Apple Silicon
Resolved 💬 3 comments Opened Mar 26, 2026 by sgewirtz1 Closed Mar 30, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
On clean exit (typing exit), Claude Code crashes with a Bun segmentation fault at address 0x0. This happens most of the time on exit. The session state is saved correctly (resume ID is printed before the panic), so there is no data loss — but the crash is disruptive.
What Should Happen?
Claude Code should exit cleanly without a Bun panic.
Error Messages/Logs
Resume this session with:
claude --resume ffea0273-83b7-4173-b9e6-c99be49fb307
============================================================
Bun v1.3.11 (759ce802) macOS Silicon
macOS v26.3.1
CPU: fp aes crc32 atomics
Args: "claude" "--dangerously-skip-permissions"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) WebSocket(4) abort_signal(154) fetch(88) jsc spawn(276) standalone_executable process_dlopen yaml_parse(98)
Elapsed: 4259658ms | User: 128720ms | Sys: 14892ms
RSS: 0.48GB | Peak: 0.62GB | Commit: 0.02ZB | Faults: 72 | Machine: 51.54GB
panic: Segmentation fault at address 0x0
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.11/M_1759ce80mgkgE+hogC_uxkvQuxkvQmmp2lB215qgB__A2AA
zsh: trace trap claude --dangerously-skip-permissions
Bun crash report: https://bun.report/1.3.11/M_1759ce80mgkgE+hogC_uxkvQuxkvQmmp2lB215qgB__A2AA
Steps to Reproduce
- Run
claude --dangerously-skip-permissions(also reproducible without this flag) - Use the session normally
- Type
exitto quit - Observe Bun panic output in terminal
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Claude Code Version
2.1.84 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Warp
Additional Information
- Crash is in Bun's process teardown after Claude Code has already finished its work — no session data is lost
- Related Bun issues with similar exit-time segfaults: oven-sh/bun#28415, oven-sh/bun#28203
- Likely fixed by bundling a newer Bun version in the Claude Code distribution
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗