Voice mode: "Connection closed: code 1006" on Linux

Status Open
Reported on v2.1.69
Maintainer reply None cached
Activity 8 comments · opened Mar 5, 2026

Bug Description

Voice mode (/voice) fails with WebSocket error: Voice stream error: Connection closed: code 1006

Steps to Reproduce

  1. Run /voice in Claude Code
  2. Voice mode enables ("Hold Space to record")
  3. Immediately or shortly after, error appears: Voice stream error: Connection closed: code 1006

Environment

  • Claude Code: 2.1.69
  • OS: Ubuntu 24.04.4 LTS, Linux 6.17.0-14-generic x86_64
  • Node: v20.11.1
  • Audio: PipeWire 1.0.5, sox 14.4.2, rec works correctly
  • Network: Direct connection (no VPN/proxy), API reachable

Troubleshooting Done

  • Verified mic works (rec and arecord both record successfully)
  • PipeWire running, audio sources detected
  • No proxy env vars set
  • pactl list sources shows active capture devices
  • Updated to latest Claude Code version
  • Confirmed curl https://api.anthropic.com returns 404 (expected, API reachable)

Expected Behavior

Voice mode should establish WebSocket connection and accept voice input.

View original on GitHub ↗

8 Comments

temujin9 · 5 months ago

This happens for me. In addition, holding down the spacebar produces weird flickering behavior and inserts and removes spaces from the input, indicating some poor interface with the input being at fault.

77media-creations · 5 months ago

Same issue on the MacOS 26.

Pager07 · 5 months ago

<img width="1285" height="99" alt="Image" src="https://github.com/user-attachments/assets/289a23ee-c52e-4815-a0bf-f157c77866bd" />

chocobuckle · 5 months ago

Same issue for me on MacOS Sequoia 15.7.3

thedavidmurray · 5 months ago

same on 26.3.1 (25D2128) and v2.1.73

matiu2 · 5 months ago

I tried changing to a different binding, in hx ~/.home-claude/keybindings.json according to https://code.claude.com/docs/en/keybindings

{
  "$schema": "https://www.schemastore.org/claude-code-keybindings.json",
  "$docs": "https://code.claude.com/docs/en/keybindings",
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "shift+ctrl+b": "voice:pushToTalk"
      }
    }
  ]
}

This stops the flickering and error messages, but then does not hear any voice. It just seems to not see it at all.

I also made sure "sox" is installed and records and plays back.

I also tried turning of key repeat with: xset r off

other bindings like alt+b go back to the jerky, "Keep holding..." and "Voice stream error: Connection closed: code 1006" - flipping between them, I'm guessing every 25 msecs or so. even with xset r off the repeats still come.

FarmLox · 5 months ago

<img width="1013" height="62" alt="Image" src="https://github.com/user-attachments/assets/69082be3-080d-42f9-bf01-3210825334a4" />

temujin9 · 4 months ago

On Kubuntu 24.04, I tried this again. This time it started showing ALSA lib pcm_dsnoop.c:567:(snd_pcm_dsnoop_open) unable to open slave, which helped diagnose. Installing pipewire-alsa fixed the issue for me.