[BUG] Claude Code causes immediate USB device disconnection

Resolved 💬 3 comments Opened Aug 24, 2025 by Nanduriss Closed Aug 28, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: <!-- output of claude --version -->
  • Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 -->
  • Terminal: <!-- e.g. iTerm2, Terminal App -->

Bug Description

<!-- A clear and concise description of the bug -->

Steps to Reproduce

  1. <!-- First step -->
  2. <!-- Second step -->
  3. <!-- And so on... -->

Expected Behavior

<!-- What you expected to happen -->

Actual Behavior

<!-- What actually happened -->

Additional Context

<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->

Claude Code USB Device Disconnection Bug Report

Issue Summary

Claude Code causes immediate USB device disconnection when attempting to access USB serial devices (ESP32 with CP2102 USB-UART bridge).

System Information

  • OS: Ubuntu 24.04.2 LTS
  • Claude Code Version: Latest (as of 2025-08-24)
  • Device: ESP32 with Silicon Labs CP210x UART Bridge
  • USB ID: 10c4:ea60

Problem Description

When an ESP32 (or other USB serial device) is connected while Claude Code is running, the device disconnects within 1-2 seconds after Claude attempts to access it. This issue:

  • Did NOT occur earlier today (morning of 2025-08-24)
  • Started occurring around 11:00 CEST
  • Prevents any USB serial communication while Claude is running

Reproducible Steps

  1. Start Claude Code
  2. Connect ESP32 via USB
  3. Device appears as /dev/ttyUSB0
  4. Run any command in Claude that checks the device (e.g., ls /dev/ttyUSB0)
  5. Device immediately disconnects with kernel errors

Evidence from System Logs

Aug 24 11:25:24 kernel: usb 5-1: USB disconnect, device number 3
Aug 24 11:25:24 kernel: cp210x ttyUSB0: failed set request 0x7 status: -19
Aug 24 11:25:24 kernel: cp210x ttyUSB0: failed set request 0x12 status: -19
Aug 24 11:25:24 kernel: cp210x ttyUSB0: failed set request 0x0 status: -19

Test Results

  • Device stays connected when Claude is NOT running
  • Device stays connected for 5+ seconds when accessed by bash script
  • Device disconnects immediately when Claude tries to access it
  • Problem persists across multiple USB ports and cables

Workaround

Currently, the only workaround is to:

  1. Close Claude Code completely
  2. Connect and work with the USB device
  3. Restart Claude after USB operations are complete

Impact

This bug makes it impossible to use Claude Code for:

  • Arduino/ESP32 development
  • Serial communication debugging
  • IoT device programming
  • Any USB-serial based development

Suspected Cause

The .claude.json configuration file shows multiple USB/serial related entries and was modified multiple times today. Claude may be monitoring or locking USB devices in a way that causes the kernel to disconnect them.

Request

Please investigate why Claude Code's file system monitoring or USB access patterns cause USB serial devices to disconnect. This is a critical issue for embedded systems development.

GitHub Issue

This should be reported at: https://github.com/anthropics/claude-code/issues

---
Report generated: 2025-08-24 11:28 CEST
Affected user: ca2@x1

View original on GitHub ↗

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