Voice mode broken in WSL2: /proc/asound/cards check fails with PulseAudio/RDP audio
Bug Description
Claude Code 2.1.83 introduced a /proc/asound/cards check for voice mode on Linux. This check breaks voice mode in WSL2, where audio is routed through WSLg's PulseAudio RDP pipe — there are no ALSA hardware sound cards, so /proc/asound/cards always returns --- no soundcards ---.
Voice mode works correctly on 2.1.81 (and 2.1.80). The regression was introduced in 2.1.83.
Environment
- Platform: WSL2 (Ubuntu 24.04) on Windows 11
- Audio path: WSLg → PulseAudio → RDP audio pipe (no ALSA hardware)
- Working version: 2.1.81
- Broken version: 2.1.83
Steps to Reproduce
- Install Claude Code 2.1.83 on WSL2
- Ensure
soxandalsa-utilsare installed - Create
~/.asoundrcto bridge ALSA → PulseAudio - Confirm PulseAudio is working:
pactl infoshows RDPSource/RDPSink - Attempt voice mode (push-to-talk) — fails silently
Root Cause
2.1.83 added a probe that reads /proc/asound/cards and checks for the string no soundcards. In WSL2, this file always contains --- no soundcards --- because audio is handled by PulseAudio over WSLg's RDP pipe, not by ALSA hardware drivers. The check should either:
- Also check for PulseAudio sources (
pactl list sources short) as a fallback - Skip the ALSA hardware check on WSL2 (detectable via
/proc/sys/fs/binfmt_misc/WSLInteroporWSL_DISTRO_NAMEenv var) - Attempt audio capture regardless and fail gracefully rather than pre-checking hardware
Workaround
Downgrade to 2.1.81: ln -sf ~/.local/share/claude/versions/2.1.81 ~/.local/bin/claude
Impact
Users on WSL2 are stuck on 2.1.81 and missing important fixes in 2.1.83 (background agent visibility after compaction, large session resume improvements, tool result cleanup, startup latency fixes).
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗