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
- Run
/voicein Claude Code - Voice mode enables ("Hold Space to record")
- 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,
recworks correctly - Network: Direct connection (no VPN/proxy), API reachable
Troubleshooting Done
- Verified mic works (
recandarecordboth record successfully) - PipeWire running, audio sources detected
- No proxy env vars set
pactl list sourcesshows active capture devices- Updated to latest Claude Code version
- Confirmed
curl https://api.anthropic.comreturns 404 (expected, API reachable)
Expected Behavior
Voice mode should establish WebSocket connection and accept voice input.
8 Comments
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.
Same issue on the MacOS 26.
<img width="1285" height="99" alt="Image" src="https://github.com/user-attachments/assets/289a23ee-c52e-4815-a0bf-f157c77866bd" />
Same issue for me on MacOS Sequoia 15.7.3
same on 26.3.1 (25D2128) and v2.1.73
I tried changing to a different binding, in
hx ~/.home-claude/keybindings.jsonaccording to https://code.claude.com/docs/en/keybindingsThis 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 offother 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 offthe repeats still come.<img width="1013" height="62" alt="Image" src="https://github.com/user-attachments/assets/69082be3-080d-42f9-bf01-3210825334a4" />
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. Installingpipewire-alsafixed the issue for me.