[BUG] Claude Code crashes/hangs when Read tool attempts to access /dev/ttyACM* or /dev/ttyUSB* serial devices

Resolved 💬 2 comments Opened Jan 9, 2026 by therealladiesman217 Closed Jan 9, 2026

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?

Claude Code crashes or hangs indefinitely when attempting to read serial device files (e.g., /dev/ttyACM0, /dev/ttyUSB0) during ESP32/Arduino development workflows. The internal readFileSync() call doesn't handle device files appropriately.

What Should Happen?

Claude Code should:

  • Detect that the path is a device file (not a regular file)
  • It should not crash, but handle the read correctly

Error Messages/Logs

Claude Code either:
  1. Crashes with EBUSY error:
  [ERROR] Error: Error: EBUSY: resource busy or locked, open '/dev/ttyACM0'
      at readFileSync (unknown)
      at readFileSync (/$bunfs/root/claude:12:370)
      at sTD (/$bunfs/root/claude:3777:768)

  2. Hangs indefinitely waiting for data from a blocking read on the device file                                                                   

Steps to Reproduce

  1. Connect an ESP32 device via USB (appears as /dev/ttyACM0)
  2. Ask Claude Code to read serial output or check device status (head -c 10 /dev/ttyACM0)
  3. Claude Code attempts to read the device file directly

Claude Model

Not sure / Multiple models

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.1 (Claude Code)

Platform

Anthropic API

Operating System

Fedora Linux (kernel 6.17.8-300.fc43.x86_64)

Terminal/Shell

Bash/ZSH

Additional Information

_No response_

This Issue was written with the help of Claude Code

View original on GitHub ↗

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