[BUG] Bun Bus error crash on macOS Silicon when pasting image (chat:imagePaste)

Resolved 💬 6 comments Opened Mar 31, 2026 by asgeirtj Closed Apr 8, 2026

Description

Claude Code crashes with a Bun Bus error when using the chat:imagePaste action (pasting an image from clipboard). This is a hard runtime crash, not a silent failure — Bun panics and the entire session terminates.

Environment

  • Claude Code version: 2.1.87
  • Bun version (bundled): 1.3.11 (759ce802)
  • OS: macOS 26.3 (Darwin 25.3.0)
  • Platform: macOS Silicon (Apple M4 Pro)
  • RAM: 48GB

Crash Details

Bus error at address 0xBAD4007
Bun v1.3.11 (759ce802) macOS Silicon

Args: "claude" "--dangerously-skip-permissions" "--verbose" "--dangerously-skip-permissions" "--verbose"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) abort_signal(16) fetch(14) jsc spawn(28) standalone_executable process_dlopen yaml_parse(222)
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:stream" "node:stream/consumers" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:zlib" "ws" "node:http2"
Elapsed: 90411ms | User: 3431ms | Sys: 1046ms
RSS: 0.89GB | Peak: 0.89GB | Commit: 0.90GB | Faults: 72 | Machine: 51.54GB

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

Bun Crash Report Link

https://bun.report/1.3.11/M_1759ce80mgkgEuhogC________ur1kJ_m45jmDuri6lD+/0w2Cmsz96C27usH__uri6lD+348uCmnu1zCA4Augg11L

Steps to Reproduce

  1. Launch Claude Code on macOS Silicon: claude --dangerously-skip-permissions --verbose
  2. Use the chat:imagePaste action (Cmd+V with an image in clipboard)
  3. Bun crashes with Bus error

Notes

  • The crash happens early in the session (~90 seconds elapsed), so this is not a long-session memory issue
  • The address 0xBAD4007 looks like a sentinel/poison value, suggesting use-after-free or accessing freed memory during image buffer processing
  • Memory usage at crash was modest (0.89GB RSS)
  • Related to #22632 (Bun crash during sessions) but with a specific, reproducible trigger (image paste) and different crash signature (Bus error vs segfault)
  • Several open issues report image paste not working (#39761, #26901, #29776) but none report it causing a full Bun panic

Expected Behavior

Image paste should either work or fail gracefully with an error message, not crash the runtime.

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗