[BUG] Bun segfault (address 0x0) when attaching PNG image on Windows 11

Open 💬 0 comments Opened Jun 15, 2026 by takeu7

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 attaching a PNG image (either by pasting from clipboard or using @file/path syntax),
Claude Code crashes immediately with a Bun segmentation fault at address 0x0.

Environment:

  • Claude Code: v2.1.177
  • Bun: v1.3.14 (Windows x64 baseline)
  • OS: Windows 11

Steps to reproduce:

  1. Start claude in terminal
  2. Either paste a screenshot PNG from clipboard, or type @path\to\image.png
  3. Claude Code crashes every time

Crash output:
panic(main thread): Segmentation fault at address 0x0
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

https://bun.report/1.3.14/e_12a41ca9mgkgkE+hogCCcKERNELBASE.dll65v8BCSastMC.dll04pMCSastMC.dll6r5UCSastMC.dlloh7U05p40B__kknm
2CA2AA

The crash is 100% reproducible. Both clipboard paste and @file reference trigger
the identical crash URL, suggesting the issue is in the image loading code path.

What Should Happen?

PNG images should be attached and sent to the API without crashing Claude Code.

Error Messages/Logs

Steps to Reproduce

  1. Start claude in terminal on Windows 11
  2. Paste a screenshot PNG from clipboard, or type @C:\path\to\image.png
  3. Claude Code crashes immediately every time

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude Code: v2.1.177

Platform

Anthropic API

Operating System

Updated OS to Windows11

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗