[BUG] Bun bus error (0xBAD4007) on clipboard image paste — macOS arm64, Claude Code 2.1.168

Resolved 💬 1 comment Opened Jun 7, 2026 by saveli Closed Jul 14, 2026

Summary

Pasting an image from the clipboard (Cmd+V) into the TUI prompt reliably crashes the session. The embedded Bun runtime panics with a bus error (SIGBUS) at address 0xBAD4007 on the main thread. 100% reproducible.

Environment

  • Claude Code: 2.1.168
  • Runtime: Bun v1.3.14 (521eedd6) macOS Silicon
  • OS: macOS 26.5.1
  • Arch: native arm64 (file $(which claude) → Mach-O 64-bit executable arm64; CPU: neon fp aes crc32 atomics)
  • Machine: Apple Silicon (M1)

Steps to reproduce

  1. Copy an image region to the clipboard: Cmd+Ctrl+Shift+4 (note the Ctrl — without it, Cmd+Shift+4 saves to a file instead).
  2. Start claude in a terminal.
  3. Cmd+V into the TUI prompt.

→ Immediate crash. Reproduces every time.

Expected

Image is attached to the prompt.

Actual

Bun panics and the session dies:

panic(main thread): Bus error at address 0xBAD4007
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

bun.report crash submitted (redacted stack sent to Bun team).

Diagnostic note

The crash is specific to the clipboard path. The same screenshot saved to a file (Cmd+Shift+4) and drag-dropped into the terminal attaches fine — no crash. So the bug is in Bun's clipboard-image decode, not image handling in general.

Crash header

Bun v1.3.14 (521eedd6) macOS Silicon
macOS v26.5.1
CPU: neon fp aes crc32 atomics
Args: "claude"
Features: ... standalone_executable process_dlopen ... claude_code

Possibly related (but distinct signatures — not dupes)

  • #61091 — image attachment crash, but Windows x64, SIGSEGV at 0x0 (null deref), different trigger/signal/address.
  • #59785 — macOS Silicon Bun segfault, but on startup, not image paste.

This one is SIGBUS at 0xBAD4007 (a poison/sentinel address), triggered specifically by clipboard image paste on arm64 — a different failure mode from both.

Workarounds

  • Drag-and-drop the image file into the terminal instead of clipboard paste — avoids the crashing path.
  • Or install the npm/Node build instead of the native Bun executable.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗