Voice mode fails in terminal CLI: WebSocket 1006 close and unstructured mic error

Open 💬 0 comments Opened Jun 30, 2026 by kimsepia

Description

Voice mode fails in the terminal CLI with two distinct errors across attempts:

  1. Voice stream error: Connection closed: code 1006 — accompanied by intermittent mic indicator flicker
  2. Input is failing, unstructured error, check your microphone

Environment

  • OS: macOS (Darwin 24.6.0)
  • Claude Code version: 2.1.196
  • Shell: zsh
  • Terminal: Terminal.app

Troubleshooting completed

  • Confirmed mic input works in System Settings > Sound > Input (level meter responds normally)
  • Confirmed Terminal is listed and enabled in System Settings > Privacy & Security > Microphone
  • Fully quit and relaunched Claude Code and Terminal — issue persists
  • Voice mode works fine in the Claude desktop app using the same physical microphone — rules out hardware issue
  • Confirmed npm package is current (2.1.196)

Conclusion

Issue appears isolated to Claude Code's terminal CLI voice-capture/streaming pipeline specifically. System-level mic access and hardware are confirmed working. The WebSocket 1006 close code (abnormal closure) suggests the audio stream is being dropped before or during transmission to the voice backend.

Steps to reproduce

  1. Open Terminal.app on macOS
  2. Run claude to start Claude Code CLI
  3. Activate voice mode
  4. Observe either error above — behavior is intermittent between the two

Expected behavior

Voice input should connect and stream successfully, as it does in the Claude desktop app.

View original on GitHub ↗